+ 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 Resposta
+ 2
"casting" (Google it)
23rd Aug 2020, 3:32 PM
RKK
RKK - avatar