import java.util.Scanner;
public class test2 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("");
int i = scan.nextInt();
double d=scan.nextDouble();
String s=scan.nextLine();
System.out.println("String: " + s);
System.out.println("Double: " + d);
System.out.println("Int: " + i);
}
}
Input =:
23
23
mks
output should be:-
String:mks
Double:23.0
Int:23
But It is not taking String input and taking only the double and Int type.
Even not asking me for give the input to string type.
so,
Input is :
23
23
output is :
String :
double:23.0
Int:23