Question: The following complete program intends to print to be or not to be but five lines have errors. Identify the line numbers and describe
The following complete program intends to print to be or not to be but five lines have errors. Identify the line numbers and describe the corresponding error. 1 public class Hamlet { 2 3 45 61 co public void printToBe() { } System.out.print("to be"); public static void main(String[]) { 7 8 9 } 10 } printToBe; System.out.print("or not"); printToBe; Line # Error: Line # Error: Line # Error: Line # Error: Line # Error:
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
