Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
updated
import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { //Undergraduate s=new Student();child cannot be a parent Student s = new Undergraduate(); s.setName("Ashish"); System.out.println(s.getName()); s.printAbout(); } } class Student { String name; public String getName() { return name; } public void setName(String n) { name = n; } public void printAbout() { System.out.println("I am a student."); } } class Undergraduate extends Student { public void printAbout() { System.out.println("I am an undergraduate."); } }
run
|
edit
|
history
|
help
0
JAVA # Boşluklu bir metinde kaç adet boşluk var
// Java Coding Challenge - 09: Find out duplicate numbers using Array
Feet-inches input validation
Firstproject
Combination Sum (Leetcode)
Человечки
OBF-7 4
homework
3.E
PE #8