Comparing Scanner & String (or int , ...) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Comparing Scanner & String (or int , ...)

I want to compare an input with something ---------------- Scanner i = new Scanner (System.in) if (i==1234){...} ---------------- But they are incomparable types (Scanner and int ) What should I do?

23rd Aug 2020, 3:30 PM
PSL
PSL - avatar
1 Answer
+ 2
"casting" (Google it)
23rd Aug 2020, 3:32 PM
Rohit