Data Types
- The term data type refers to the type of data that can be stored in a variable.
- Sometimes,java is called a "strongly typed language"because when you declare a variable,you must specify the variable's type.
- Then the compiler ensures that you don't try to assign data of the wrong type to the variable.
Variables
Variable is name of reserved area allocated in memory
There are 3 types of variables in Java
- Local variable
- Static variable
- Instance Variable.
Local Variable
A variable that is declared inside the method is called local variable.
Static Variable
A variable that is declared as static is called static variable. It cannot be local.
Instance Variable
A variable that is declared inside the class but outside the method is called instance variable.
It is not declared as Static.
thank you for my viewers.
ReplyDeletegood contentSofftwareneeds
ReplyDelete