Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
anonymous abstract class
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { static abstract class Test{ public int num; private Test(){ this(0); } private Test(int i){ num = i; } public abstract void foo(); protected void bar(){ System.out.println("abc"); } } public static void main(String args[]) { Test t = new Test(3){ @Override public void foo(){ System.out.println(num); bar(); } }; t.foo(); } }
run
|
edit
|
history
|
help
0
Java Switch
rstring
JAVA # Cümleye Boşluk Bırakma 2
exp 2
Find kth element from last in a singly linked list
Iterative Merge sort
Add Index of max number in an array
3e
Draw rectangle using for loop
Intersection of Array