Question: Wht is wrong in the following program? Public class Test 1 public static void main ( String [ ] args ) { try 1 System.

Wht is wrong in the following program?
Public class Test 1
public static void main (String[] args){
try 1
System. out.printin("Welcome to Java");
I
1
1
You cannot have a try block without a catch block or a finally block.
A method call that does not dectare exceptions cannot be placed inside a try block.
You cannot have a try block without a catch block.
Nothing is wrong.
Wht is wrong in the following program? Public

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!