Skip to content

Instantly share code, notes, and snippets.

@mrnirva
Created September 20, 2020 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrnirva/e8c6a3b847ebe6971cc0898f679d07e0 to your computer and use it in GitHub Desktop.
Save mrnirva/e8c6a3b847ebe6971cc0898f679d07e0 to your computer and use it in GitHub Desktop.
package sinifnesne;
public class SinifNesne {
public static void main(String[] args) {
Arac araba = new Arac("Merhaba Dünya");
// Burada parametreden veri yolladığımız için
// İkinci yapıcı metot çağırılacaktır
}
}
class Arac{
// Yapıcı Metotlar (Constructor) oluşturmak
public Arac(){
System.out.println("Yapıcı Metot Çağırıldı!");
}
public Arac(String yazilacakYazi){
System.out.println(yazilacakYazi);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment