Code:
Output:
Code:
Output:
note:
int - nextInt()
String - next()
nextLine()
char - next().charAt(0)
double - nextDouble()
long - nextLong()
boolean - nextBoolean()
Code:
Output:
note:
Different between next() & nextLine()next() - take string untill a space
nextLine() - take string untill next line
No comments:
Post a Comment