Static Concept in Java -
1. Static Block: It always execute before main method.
This is particularly useful for performing initialization tasks that need to be done only once, such as establishing connections.
2. Static Class: Outer class never static, but inner class will be static.
Static classes do not require an instance of the outer class to be instantiated. They can only access static members of the outer class.
3. Static Method: You can call a static method without creating an object of the class. Static methods can only access other static members (variables or methods) of the class.
4. Static Variable: It alwyas declared with class level and must be static
A static variable is shared among all instances of the class. This means that all objects of the class refer to the same variable. Static variables are initialized when the class is loaded.
#CoreJava #Java #Fullstack #SoftwareDevelopment #JavaDevelopment #FullStackJavaDeveloper #softwaredevelopment
💻 Stay ahead in 2025 and beyond!
📢 Don't forget to like, share, and subscribe for more insightful content.
Visit fullstackjavadeveloper.in for more details and enrollment opportunities.
#CoreJava #ControlStatement #Java #Fullstack #FullStackJavaDeveloper #SpringBoot #SoftwareDevelopment
Connect with us:
Call or WhatsApp: +91 7887575991 / 020 47212644 [24/7 Support]
Visit: fullstackjavadeveloper.in
Facebook - / fullstackjavadeveloper
LinkedIn - / full-stack-java-developer-pune
Instagram - / fullstackjavadeveloper
Meet Mr. Kiran Jadhav :
Software Architect | Full Stack Book Author | Technical Keynote Speaker
LinkedIn - / kiran-jadhav-22649b99
guys if you like this video please do subscribe now and press the bell icon to not miss any update from Full Stack Java Developer, Pune
#CodeDeployment #JavaApp #Programming #DevLife #TechTips #FileManagement #Coding #OpenSource #Java #TechTutorial #DeveloperCommunity #JavaProjects #LearnToCode #AppDevelopment #WebDevelopment #TechEducation #like #share #comment
Disclaimer/Policy:
--------------------------------
Note: All uploaded content in this channel is mine and it’s not copied from any community, you are free to use source code from above mentioned GitHub account