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 Personnummer { | |
public static void main(String[] args) { | |
String pNr; //deklarerar personnr | |
System.out.print("Ange ditt personnummer (10 siffror): "); | |
Scanner kbd = new Scanner(System.in); //uppfattar vad som skrivs på tangentbord | |
pNr = kbd.nextLine(); |