In Java, code statements are written in code blocks.
A code block starts with an open brace { and end with a close brace }.For example:
public class A {
int x = 2;
public static void main(String[] args) {
System.out.println("Holla!");
}}
Identify and correct the error in the below code.
package q10805 :-
package q10805;
public class PrintHello {
public static void main(String[] args) {
System.out.println("Hello, I am learning Java!");
}
}
0 Comments