ইনস্ট্যান্স ব্লক (instance block) ও স্ট্যাটিক ব্লকের (static block) মধ্যে পার্থক্য জাভা
public class A {
A()
{ //ডিফল্ট কন্সট্রাক্টর
System.out.println("This Is Default Constructor");
}
{ //ইনস্ট্যান্স ব্লক
System.out.println("This Is Instanse Block");
}
public static void main(String[] args)
{
A r=new A();
}
}
public class A {
// int a=10;
static int b=30;
static { //স্ট্যাটিক ব্লক
System.out.println("This Is static Block "+b);
}
public static void main(String[] args)
{
}
}
WorldTimeTech provides Top News,Education, Health Tips, Lifestyle, Science and Technology, Computer Help Tips and Unknown facts and also more and more. We Always Try to Give You Helpful Content to you. Thank You...
Copyright © 2023 WorldTimeTech.com All Rights Reserved.