46 - static keyword in Java (Hindi/Urdu)
Uncovering Technologies
0:00 / 0:00
46 - static keyword in Java (Hindi/Urdu)
3 796 просмотров · 7 лет назад
Uncovering Technologies
4,08 тыс. подписчиков
3 796 просмотров · 7 лет назад
LIKE, SHARE & SUBSCRIBE
In Java programming language, static is a reserved keyword as well it is also a non-access modifier.
The main application of the static keyword is to create static data members so that we can optimize our code's memory by using static data members.
We can apply the static keyword to :
1) Variables (Global Variables or Class Variables or Static Variables)
2) Methods (Global Methods or Class Methods or Static Methods)
3) Blocks (Static Blocks or Static Initialization Blocks)
4) Inner Classes (Static Inner Class or Static Nested Class)
We cannot apply the static keyword to :
1) Instance Variable
2) Local Variable
3) Main Class
4) Interfaces
5) Constructor
We can overload the static methods as well as we can overload our MAIN method because the MAIN method is a static method.
Static data members are stored in a special memory module which is known as the Permanent Generation (PermGen) Space.
In this video, we are using HotSpot JVM (Java Virtual Machine) which is provided by Oracle in it's JDK (Java Development Kit).
We cannot use super and this keyword with static context (static blocks and static methods).
Execution sequence of static data members is depended on the Static Control Flow.
this keyword video : • 42 - this keyword in Java (Hindi/Urdu)
Method Overloading video : • 44 - Method Overloading in Java (Hindi/Urdu)
Modifiers in Java video : • 45 - Introduction to Modifiers in Java (Hi...
Link to codes used in this video : https://drive.google.com/open?id=1RUO...
Thanks for watching and stay tuned.
Like us on Facebook - https://goo.gl/y7oxYc
Follow us on Twitter - https://goo.gl/UKmTfn