package com.sudhirtheindian2.java123;
public class instance_vs_static {
    public static void main(String[] args) {
// What is difference between instance block  & static block in java
//        Instance Block
//        Note -- instance block called before the constructor
//        1 it deals with object
//        2 executed at the time of object creation
//        3 no any  keyword required
//        4 static & non static variable can be accessed
//        inside the instance block
//          Static Block
//          1 It deals with class
//          2 Executed  at the time of loaded .class file in java
//          3 static keyword is required
//          4 only static variable can be accessed
//           inside the static block
    }
}
 
टिप्पणियाँ
एक टिप्पणी भेजें