0
Whatâs wrong with this code??? I donât know why Scanner doesnât work
5 Respostas
+ 4
I would use the scanner inside the main class:
public class Trigonometry extends Formula {
public static void main(String[] args) {
Scanner s = new Scanner (System.in);
int hip= s.nextInt();
System.out.print(hip);
}
}
int hip --> nextInt()
String hip --> next() or nextLine()
double hip --> nextDouble()
and so on (nextChar is not possible)
...
+ 2
TomĂĄs RodrĂguez Your welcome :)
+ 1
It seems it works well
+ 1
Why don't you call next() method inside the main()?
+ 1
Thank you Denise, i have just debuged my code!!