Skip to content

Instantly share code, notes, and snippets.

@pehaa
Created February 7, 2017 08:38
Show Gist options
  • Save pehaa/6021fbeed27117b5241711c74b86ee98 to your computer and use it in GitHub Desktop.
Save pehaa/6021fbeed27117b5241711c74b86ee98 to your computer and use it in GitHub Desktop.
java scanner
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