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 28 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
Wow, this really help


strudel15

  • Member
  • Posts: 324
Reply 3 on: Yesterday
YES! Correct, THANKS for helping me on my review

 

Did you know?

The word drug comes from the Dutch word droog (meaning "dry"). For centuries, most drugs came from dried plants, hence the name.

Did you know?

The human body's pharmacokinetics are quite varied. Our hair holds onto drugs longer than our urine, blood, or saliva. For example, alcohol can be detected in the hair for up to 90 days after it was consumed. The same is true for marijuana, cocaine, ecstasy, heroin, methamphetamine, and nicotine.

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?

Acetaminophen (Tylenol) in overdose can seriously damage the liver. It should never be taken by people who use alcohol heavily; it can result in severe liver damage and even a condition requiring a liver transplant.

Did you know?

Vaccines prevent between 2.5 and 4 million deaths every year.

For a complete list of videos, visit our video library