Geography, asked by ranjitak63, 8 hours ago

Debug the errors in the following program along with the line no.



line 1: Scanner sc = New Scanner ( System.in);

line 2: System.out.println( “ Enter your age “);

line 3: int age=sc.nextint( ) ;

line 4: int k==age>18 ? vote : cannot vote ;

line 5: System.out.println( k );​

Answers

Answered by adhikaryantarjita08
0

Answer:

Line 1: Scanner sc = new Scanner(System.in);

Line 2:System.out.println(" Enter your age:");

Line 3:int age = sc.nextInt();

Similar questions