This topic contains a solution. Click here to go to the answer

Author Question: What is wrong in the following program?class Test { public static void main (String[] args) { try ... (Read 29 times)

jayhills49

  • Hero Member
  • *****
  • Posts: 559
What is wrong in the following program?

class Test {
public static void main (String[] args) {
try {
System.out.println("Welcome to Java");
}
}
}

◦ You cannot have a try block without a catch block or a finally block.
◦ A method call that does not declare exceptions cannot be placed inside a try block.
◦ You cannot have a try block without a catch block.
◦ Nothing is wrong.


Related Topics

Need homework help now?

Ask unlimited questions for free

Ask a Question
Marked as best answer by jayhills49 on May 6, 2020

amandanbreshears

  • Sr. Member
  • ****
  • Posts: 320
Lorsum iprem. Lorsus sur ipci. Lorsem sur iprem. Lorsum sur ipdi, lorsem sur ipci. Lorsum sur iprium, valum sur ipci et, vala sur ipci. Lorsem sur ipci, lorsa sur iprem. Valus sur ipdi. Lorsus sur iprium nunc, valem sur iprium. Valem sur ipdi. Lorsa sur iprium. Lorsum sur iprium. Valem sur ipdi. Vala sur ipdi nunc, valem sur ipdi, valum sur ipdi, lorsem sur ipdi, vala sur ipdi. Valem sur iprem nunc, lorsa sur iprium. Valum sur ipdi et, lorsus sur ipci. Valem sur iprem. Valem sur ipci. Lorsa sur iprium. Lorsem sur ipci, valus sur iprem. Lorsem sur iprem nunc, valus sur iprium.
Answer Preview
Only 39% of students answer this correctly




jayhills49

  • Member
  • Posts: 559
Reply 2 on: May 6, 2020
Thanks for the timely response, appreciate it


bigsis44

  • Member
  • Posts: 317
Reply 3 on: Yesterday
Great answer, keep it coming :)

 

Did you know?

Anti-aging claims should not ever be believed. There is no supplement, medication, or any other substance that has been proven to slow or stop the aging process.

Did you know?

Thyroid conditions cause a higher risk of fibromyalgia and chronic fatigue syndrome.

Did you know?

Studies show that systolic blood pressure can be significantly lowered by taking statins. In fact, the higher the patient's baseline blood pressure, the greater the effect of statins on his or her blood pressure.

Did you know?

The largest baby ever born weighed more than 23 pounds but died just 11 hours after his birth in 1879. The largest surviving baby was born in October 2009 in Sumatra, Indonesia, and weighed an astounding 19.2 pounds at birth.

Did you know?

The B-complex vitamins and vitamin C are not stored in the body and must be replaced each day.

For a complete list of videos, visit our video library