I have the following class in Java:
class Adresse4 {
private String strasse;
private String hausnummer;
private int postleitzahl;
private String ort;
private long telefon;
Adresse4(String strasse, String hausnummer, int postleitzahl, String ort, long telefon) {
this.strasse = strasse;
this.hausnummer = hausnummer;
this.postleitzahl = postleitzahl;
this.ort = ort;
this.telefon = telefon;
}
Adresse4(Adresse4 ad) {
this.strasse = ad.strasse;
this.hausnummer = ad.hausnummer;
this.postleitzahl = ad.postleitzahl;
this.ort = ad.ort;
this.telefon = ad.telefon;
}
}
and creating an object from this class like this:
Adresse4 adTest = new Adresse4("Lothstraße", "22", 80999, Ort.Berlin, 09909999);
My IDE tells me that the integer number is too large where I have declared a long.
How can I fix this?