Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Java Q4
import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { 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
3f
test
1
Value pair analysis
Arredondamento de datas para dias 10, 20 e 30
hello_world_test
10 Wizards
練習3-6
Java Switch
Application