Use of Static Block in Java || Lesson 47 || Java Programming || Learning Monkey ||

Veröffentlicht am: 13 Juli 2023
auf dem Kanal: Wisdomers - Computer Science and Engineering
162
3

Use of Static Block in Java
In this class, We discuss the Use of Static Block in Java.
The reader should have prior knowledge of static variables in Java. Click here.
Static Block:
A block of code written with the keyword static is called a static block.
Example:
The below diagram shows the example code.
In the above code, we have two static blocks.
We can write any number of static blocks.
Static blocks are executed when the class is loaded to Random access memory.
One of the uses of the static block is to initialize the static variables.
In real life, we have many uses for static blocks.
We can call static methods in static blocks.
Link for playlists:
   / @wisdomerscse  


Link for our website: https://learningmonkey.in

Follow us on Facebook @   / learningmonkey  

Follow us on Instagram @   / learningmonkey1  

Follow us on Twitter @   / _learningmonkey  

Mail us @ learningmonkey01@gmail.com


Auf dieser Seite können Sie das Online-Video Use of Static Block in Java || Lesson 47 || Java Programming || Learning Monkey || mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Wisdomers - Computer Science and Engineering 13 Juli 2023 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 162 Mal angesehen und es wurde von 3 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!