We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7666b51 commit 2b6ad5bCopy full SHA for 2b6ad5b
Classes and objects/OrderOfExecution.java
@@ -0,0 +1,24 @@
1
+class Blocks{
2
+ //creating an anonymous blocks
3
+ {
4
+ System.out.println("Inside Anonymous Block");
5
+ }
6
+ //creating a static block
7
+ static{
8
+ System.out.println("Inside Static Block");
9
10
+
11
+ //creating constructor of class
12
+ Blocks(){
13
+ System.out.println("Inside Constructor");
14
15
+}
16
+class OrderOfExecution{
17
+ //creating an object of class blocks
18
+ public static void main(String args[]){
19
+ Blocks obj=new Blocks();
20
+ System.out.println("**************");
21
+ //creating another object of class Blocks
22
+ Blocks obj1=new Blocks();
23
24
0 commit comments