L3, Basics of Java Syntax, Understanding usage of braces, package q10805

0

 In Java, code statements are written in code blocks.

L3, Basics of Java Syntax, Understanding usage of braces, package q10805 In JAVA LPU GeeksCodes


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!");
}
}

Tags

Post a Comment

0Comments
Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Learn More
Accept !
✨ Updates