You are viewing a single comment's thread. Return to all comments →
it is the actual code cause afterusing the scan.nextInt(); or scan.nextDouble(); it looks that it is in nextline but its not so ....
import java.util.Scanner;
public class Solution {
public static void main(String[] args) { Scanner scan = new Scanner(System.in); int i = scan.nextInt(); // Write your code here. double d= scan.nextDouble(); scan.nextLine(); String s= scan.nextLine(); System.out.println("String: " + s); System.out.println("Double: " + d); System.out.println("Int: " + i); }
}
Seems like cookies are disabled on this browser, please enable them to open this website
Java Stdin and Stdout II
You are viewing a single comment's thread. Return to all comments →
it is the actual code cause
afterusing the scan.nextInt(); or scan.nextDouble(); it looks that it is in nextline but its not so ....
import java.util.Scanner;
public class Solution {
}