0
Problem with the objects
Never understand the problem https://code.sololearn.com/cop4phvIS9rk/?ref=app https://code.sololearn.com/cop4phvIS9rk/?ref=app
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");
}
}
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");
}
}