What does nextInt() means ,if we use float value here would it be printed?
Next int we write in the int n = scn.nextInt()
Hey @kiranjotkaur
The java.util.Scanner.nextInt() method Scans the next token of the input as an int.
if you use float value , This will be InputMismatchException
okayy was thinking the same thing, thanks a ton
Please mark your doubts as resolved in your course’s.