/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;
import java.lang.reflect.Constructor;
import java.lang.reflect.Modifier;


abstract class Foo {
	protected int x;

	protected Foo(int x) {
		this.x = x;
	}

	public abstract void bar();
}
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Foo foo = new Foo(123) { // <<== This works because of "compiler magic"
			public void bar() {
				System.out.println("hi " + x);
			}
		};
		foo.bar();
		
		Class<?> clazz = foo.getClass();
		for (Constructor<?> c : clazz.getDeclaredConstructors()){
			System.out.println(c);
			System.out.println("public? "+Modifier.isPublic(c.getModifiers()));
			System.out.println("protected? "+Modifier.isProtected(c.getModifiers()));
			System.out.println("private? "+Modifier.isPrivate(c.getModifiers()));
//			System.out.println("default? "+Modifier.isProtected(c.getModifiers()));
		}
	}
}