import java.util.Scanner; public class Tastatur { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.println("Hei, hva heter du?"); String svar = scanner.nextLine(); System.out.println("Gi meg et tall!"); String x = scanner.nextLine(); int tall = Integer.parseInt(x); System.out.println("Du svarte: " + tall); scanner.close(); } }