learn-dlang/lesson#19.2 - Inheriting fr.../main.d

17 lines
203 B
D

import inheritance;
void main() {
John john = new John("123456");
john.speak();
Anna anna = new Anna("098700");
anna.speak();
}
/* OUTPUT:
Hello, world!
Hi! My id is: 123456.
Hello, world!
*/