0
public class whileLoop { public static void main(String[ ] args) { int a = 10; while(a < 20); System
pls is anytin wrong wt dis code?
1 Réponse
0
Yes, you have infinite while loop. You need to put some code below while, for example:
while(a<20) { System.out.print( a ); a--; }
Note:
-System is a final class from the java.lang package.
-out is a class variable of type PrintStream declared in the System class.
-print is a method of the PrintStream class.