Skip to content

Instantly share code, notes, and snippets.

@LaurentiuGabriel
Created June 23, 2020 17:09
Show Gist options
  • Select an option

  • Save LaurentiuGabriel/581a813f17cadb9bbbbba6f78aa176ec to your computer and use it in GitHub Desktop.

Select an option

Save LaurentiuGabriel/581a813f17cadb9bbbbba6f78aa176ec to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class App {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("You need to type something: ");
String input = scanner.nextLine();
System.out.println("User has typed: " + input);
System.out.println("You need to type integer: ");
Integer number = scanner.nextInt();
System.out.println("User has typed the following number: " + number);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment