Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- {
- System.out.println("A Brace");
- }
- static {
- System.out.println("A Static Brace");
- }
- public A() {
- System.out.println("A Constructor");
- }
- }
- class B extends A {
- {
- System.out.println("B Brace");
- }
- static {
- System.out.println("B Static Brace");
- }
- public B() {
- super();
- System.out.println("B Constructor");
- }
- }
- public class Main {
- public static void main(String[] args) throws InterruptedException {
- System.out.println("Enter main");
- B b = new B();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement