This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); }} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class test { | |
{ | |
System.out.println("one"); | |
} | |
static { | |
System.out.println("static one"); | |
} | |
public static void main(String[] args) { | |
new test().run(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static{ | |
System.out.println("Bloco estático"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
System.out.println("Pré Construtor"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private test() { | |
{ | |
System.out.println("two"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private test() { | |
System.out.println("two"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Entidade{ | |
@Id | |
@GeneratedValue | |
private int id; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
@SequenceGenerator(name = "Entidade_Seq") | |
public class Entidade { | |
@Id | |
@GeneratedValue(generator = "Entidade_Seq", strategy = GenerationType.AUTO) | |
private int id; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Entity | |
public class Comentario { | |
@Id | |
@GeneratedValue | |
private long id; | |
private String comentario; | |
@Any(metaColumn = @Column(name = "detail_type")) | |
@AnyMetaDef(idType = "long", metaType = "string", metaValues = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AnyMetaDef(idType = "long", metaType = "string", metaValues = { | |
@MetaValue(value = "RESTAURANTE", targetEntity = Restaurante.class), | |
@MetaValue(value = "PRATO", targetEntity = Prato.class) }) |
OlderNewer