Computer Science, asked by faneshitastic17, 9 months ago

Pls can anyone tell me what's wrong with this code...a red line is coming under "in"​

Attachments:

Answers

Answered by XxxXXJAYXXxxX
1

Answer:

THE PROBLEM IS THAT YOU HAVE NOT DECLARED THE SCANNER OBJECT 'IN' WHICH CAN BE DONE BY THE FOLLOWING LINE OF CODE

Scanner in=new Scanner(System.in);

PLEASE PUT THE LINE BEFORE THE INT VARIABLE DECLARATION. ALSO, IMPORT THE SCANNER PACKAGE BY THE FOLLOWING-

import java.util.*;

Similar questions