Skip to content

Instantly share code, notes, and snippets.

{
System.out.println("Pré Construtor");
}
static{
System.out.println("Bloco estático");
}
class test {
{
System.out.println("one");
}
static {
System.out.println("static one");
}
public static void main(String[] args) {
new test().run();
class test {
{ System.out.println("one"); }
static { System.out.println("static one"); }
public static void main(String[] args)
{ new test().run(); new test().run(); }
private test(){
{ System.out.println("two"); }}