Created
September 20, 2020 14:30
-
-
Save mrnirva/e8c6a3b847ebe6971cc0898f679d07e0 to your computer and use it in GitHub Desktop.
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
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