Identify and fix the errors in the following code:

Short Answer
Views 3079

Answer:

1 public class Welcome {
2 public void Main(String[] args) {
3 System.out.println('Welcome to Java!);
4 }
5 }

Line 2. Main should be main. 
Line 2. static is missing.
Line 3: Welcome to Java! should be enclosed inside double quotation marks.
Line 5: The last ) should be }. 

Related Articles:

This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of Java Programming Language, click the links and dive deeper into this subject.

Join Our telegram group to ask Questions

Click below button to join our groups.