140k views
1 vote
Identify at least 6 errors from the following program code. Write all the errors and rewrite the correct program.(11 pts)

1. public E2
2. {
3. Public static void main(String )
4. {
5. System.Out.Println(“hello)
6. }

User Bochgoch
by
5.4k points

1 Answer

13 votes

Answer:The code after rearrange the question segment:

public class Q// Class declaration of Q name.

{// Open the class body.

public static void main(String[] a) // Main function declaration.

{ //Open the main-function body.

System.out.println("Q"); // Print statement which print Q.

} //close the main-function body.

}//close the class body.

Output:

Q

Step-by-step explanation:

User Haansi
by
5.5k points