Ticker

6/recent/ticker-posts

Ad Code

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

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

Post a Comment

0 Comments