Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Instance fields are no overridden
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class A { public int x = 1; } class B extends A { public int x = 0; } class Rextester { public static void main(String args[]) { A a = new B(); System.out.println(a.x); System.out.println("Hello, World!"); } }
run
|
edit
|
history
|
help
0
reverse Linked List
add2
program to count number of lines
Coding For Fandroid
Bank System
Remove duplicates in string
Java messing around
jb15.0
toma!
else weird