Question: Can anyone tell me why this code is not working? It's done in java. package com.Math2121; class Practice { public int someMethod() { int counter
Can anyone tell me why this code is not working?
It's done in java.
package com.Math2121; class Practice { public int someMethod() { int counter = 2000; for (int i = 1; i <= 50; i++) { counter = counter + 7; for (int j = i + 1; i <= 250; i++) { counter = counter + 11; } } return counter; } } public class Math { public static void main(String[] args){ Practice pr = new Practice(); pr.someMethod(); } } Every time I run this I get this statement as an output.
Process finished with exit code 0
why am I getting this?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
