10.5k views
0 votes
What does the following code print?

// upload only .txt file ***************************************************** public class { public static void main(String[] args) // end of main } // end of class.

User Cyril F
by
6.0k points

1 Answer

1 vote

Answer:

Error - At least one public class is required in main file

if you change it too:

public class main{

public static void main(String[] args)

int x=5 ,y = 10;

if (x>5 && y>=2) System.out.println("Class 1");

else if (x<14

// end of main

}

// end of class.

than it will say Class 2.

Step-by-step explanation:

User Pramit
by
6.0k points