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 23 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
Excellent


CAPTAINAMERICA

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

 

Did you know?

Malaria mortality rates are falling. Increased malaria prevention and control measures have greatly improved these rates. Since 2000, malaria mortality rates have fallen globally by 60% among all age groups, and by 65% among children under age 5.

Did you know?

Throughout history, plants containing cardiac steroids have been used as heart drugs and as poisons (e.g., in arrows used in combat), emetics, and diuretics.

Did you know?

The liver is the only organ that has the ability to regenerate itself after certain types of damage. As much as 25% of the liver can be removed, and it will still regenerate back to its original shape and size. However, the liver cannot regenerate after severe damage caused by alcohol.

Did you know?

Patients who have been on total parenteral nutrition for more than a few days may need to have foods gradually reintroduced to give the digestive tract time to start working again.

Did you know?

An identified risk factor for osteoporosis is the intake of excessive amounts of vitamin A. Dietary intake of approximately double the recommended daily amount of vitamin A, by women, has been shown to reduce bone mineral density and increase the chances for hip fractures compared with women who consumed the recommended daily amount (or less) of vitamin A.

For a complete list of videos, visit our video library