fork download
  1. public class Numbers {
  2. static int number[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
  3. static int total = number.length;
  4. static int counter =0;
  5. public static void main(String[] args) {
  6.  
  7. while (counter< total){
  8. int theNumber = number[counter];
  9.  
  10. if(theNumber = 7 ) {
  11. continue;
  12. }
  13. System.out.println("Поздравляем, "+ theNumber + "!" );
  14. counter++;
  15.  
  16. }
  17. }
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class Numbers is public, should be declared in a file named Numbers.java
public class Numbers {
       ^
Main.java:10: error: incompatible types: int cannot be converted to boolean
	if(theNumber = 7 ) {
	             ^
2 errors
stdout
Standard output is empty