Advertisement
Guest User

Untitled

a guest
Jan 21st, 2019
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. public static void main(String... args){
  2.     Scanner sc = new Scanner(System.in); //Scanner erstellen
  3.     String eingabe = null; // Variable anlegen um Eingabe zu speichern
  4.    
  5.     System.out.println("Gebe was ein: ");
  6.     eingabe = sc.nextLine(); //eingabe über Scannerobjekt in Variable speichern
  7.    
  8.     System.out.println("Deine Eingabe ist: " + eingabe); //ausgeben
  9.    
  10.     sc.close();
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement