Created
February 7, 2017 08:38
-
-
Save pehaa/6021fbeed27117b5241711c74b86ee98 to your computer and use it in GitHub Desktop.
java scanner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Solution { | |
public static void main(String[] args) { | |
Scanner scan = new Scanner(System.in); | |
int i = scan.nextInt(); | |
scan.nextLine(); | |
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); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment