Files
java_lab1/GenericContact.java
Maksytka d0c8f6a35b 1. Realize all program functions
TODO: Replace void with String in methods; Interfaces
2025-09-25 20:45:49 +07:00

8 lines
231 B
Java

abstract class GenericContact{
String name;
String number;
String getType(){
return this instanceof PersonalContact == true ? "Персональный контакт" : "Деловой контакт";
}
}