Kids Learning Java: Kids learn coding like playing games by Yang Hu

Kids Learning Java: Kids learn coding like playing games by Yang Hu

Author:Yang Hu [Hu, Yang]
Language: eng
Format: azw3, epub
Published: 2020-08-13T16:00:00+00:00


1. Create file: TestInheritence.java

class Person {

protected String name ;

protected int age ;

public Person() {

System.out .println("Parent Person() instantiation" );

}

public Person(String name, int age) {

System.out .println("Parent Person(String name, int age) instantiated " );

}

public void say() {

System.out .println("Person can speaking" );

}

}

/**

Person is called parent class or super class

Student is called a subclass of Person

*/

class Student extends Person {

public Student() {



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.