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
1a
Length of longest substring
loding
Hanna Rextster.com
fizzbuzz
first activity
Java Variable
2darray
Coding Challenge - 04 (Perfect numbers)
Filter Iterator