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
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
Social Sciences,
4 hours ago
Biology,
4 hours ago
Business Studies,
4 hours ago
English,
8 hours ago
History,
8 months ago
Physics,
8 months ago