7th Apr 2022, 9:04 AM
Omer Haider
Omer Haider - avatar
2 Answers
+ 1
public class Omer { private String father; private String mother; public Omer(String f, String m) { father = f; // correct way... mother = m; } private String parent () { return father + " " + mother; } public static void main(String[] args) { Omer meiam = new Omer("Haider", "Jawaher"); System.out.println("my parent : " + meiam.parent() ); System.out.println("Hello , it's me"); } }
7th Apr 2022, 9:09 AM
Jayakrishna 🇼🇳
0
public class Omer { private String father; private String mother; public Omer(String f, String m) { father = f; mother = m; } public String parent () { return father + " " + mother; } } public class HelloOmer { public static void main(String[] args) { Omer meiam = new Omer("Haider", "Jawaher"); System.out.println("my parent : " + meiam.parent() ); System.out.println("Hello , it's me"); } }
7th Apr 2022, 9:12 AM
Ferdiansyah
Ferdiansyah - avatar