Lecture 7
Lecture 7
Unit 1
Lecture 7
Lecture 7
• Static Member
• Final Member
Static Keyword in Java
• The static keyword in Java is mainly used
for memory management.
• The static keyword in Java is used to share
the same variable or method of a given
class.
• We can apply static keywords with
variables, methods, blocks, and nested
classes.
• The static keyword belongs to the class
than an instance of the class.
The static keyword is a non-access
modifier in Java that is applicable
for the following:
1.Blocks
2.Variables
3.Methods
4.Classes
Bike10(){
speedlimit=70;
System.out.println(speedlimit);
}