Static Block

What will be output of following java program? (Static Interview Question)

class A {                 static                 {                                 System.out.println(“A is Loaded”);                 }                 public A()                 {                                 System.out.println(“A…

Read More

What will be output of following java program? (Static Interview Question)

class StaticBlock {                 int a;                 static     //Static Block                 {                                 System.out.println(“Class StaticBlock is Loaded”);                 }                …

Read More

What will be output of following java program? (Static Interview Question)

class StaticBlock {                 static int a;                 static     //Static Block                 {                                 a=7;                                 System.out.println(“Hello”);                 }                …

Read More