You are viewing a single comment's thread. Return to all comments →
yep you are correct but following code run in the command prompt properly though I didn't use another 'String e' to the programm. can you explain why.
import java.util.Scanner;
public class Solution {
public static void main(String[] args) { Scanner scan = new Scanner(System.in); Scanner scan2 = new Scanner(System.in); int i = scan.nextInt(); double d = scan.nextDouble(); String s=scan2.nextLine(); // Write your code here. System.out.println("String: " + s); System.out.println("Double: " + d); System.out.println("Int: " + i); }
}
Java Stdin and Stdout II
You are viewing a single comment's thread. Return to all comments →
yep you are correct but following code run in the command prompt properly though I didn't use another 'String e' to the programm. can you explain why.
import java.util.Scanner;
public class Solution {
}