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 31 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
YES! Correct, THANKS for helping me on my review


sultansheikh

  • Member
  • Posts: 335
Reply 3 on: Yesterday
Gracias!

 

Did you know?

Approximately one in four people diagnosed with diabetes will develop foot problems. Of these, about one-third will require lower extremity amputation.

Did you know?

Parkinson's disease is both chronic and progressive. This means that it persists over a long period of time and that its symptoms grow worse over time.

Did you know?

Approximately 500,000 babies are born each year in the United States to teenage mothers.

Did you know?

To combat osteoporosis, changes in lifestyle and diet are recommended. At-risk patients should include 1,200 to 1,500 mg of calcium daily either via dietary means or with supplements.

Did you know?

Most fungi that pathogenically affect humans live in soil. If a person is not healthy, has an open wound, or is immunocompromised, a fungal infection can be very aggressive.

For a complete list of videos, visit our video library