K
k3v!n
Gast
Hallo Community,
ich habe einen Kosntruktor:
public Node(double lat, double lon, String tag) { // Konstruktor 1
this.lat = lat;
this.lon = lon;
this.tag = tag;
}
nun möchte ich einen zweiten Kosntruktor, dem vom ersten Konstruktor, lat und lon übergeben wird und tag auf null gesetzt wird.
ist das so richtig?:
public Node(){
this.lat=lat;
this.lon=lon;
this.tag=null;
}
Danke und Liebe Grüße!
ich habe einen Kosntruktor:
public Node(double lat, double lon, String tag) { // Konstruktor 1
this.lat = lat;
this.lon = lon;
this.tag = tag;
}
nun möchte ich einen zweiten Kosntruktor, dem vom ersten Konstruktor, lat und lon übergeben wird und tag auf null gesetzt wird.
ist das so richtig?:
public Node(){
this.lat=lat;
this.lon=lon;
this.tag=null;
}
Danke und Liebe Grüße!