This article specially deals to understand about the variables in Java and its data types. It really helpful for the Java Beginners and Selenium Freshers who want to be a professional selenium tester. First we need to try to understand what is variable ?
Generally variables are used to store the data that may be number,character or String(group of characters). Variable can be also referred as name of the reserved area allocated in memory location.
How to declare a variable ?
int a = 100; // a is the variable of type Integer that holds the value 100 reserved in the RAM.
There are different types of variables available in Java. Those variables are given as below.
Variables that are declared with in methods and it will have scope with in that method
Instance variable:
Variables that are declared with in Class area but not with in methods are termed as Instance variables. It can be used by all the methods inside that class. It denotes the state of that specific class.
Static variable:
If the variables is declared as static then it can be used as local. Value of the variable can be changed only in static methods. Modification of static static variable will be reflected in the all the objects or instances using that variable.
What is meant by Datatype ?
Datatype is to denote that what type of data is going to be stored in specific variable. Two different types of datatypes are listed below.
Generally variables are used to store the data that may be number,character or String(group of characters). Variable can be also referred as name of the reserved area allocated in memory location.
How to declare a variable ?
int a = 100; // a is the variable of type Integer that holds the value 100 reserved in the RAM.
There are different types of variables available in Java. Those variables are given as below.
- Local variable
- Instance variable
- Static variable
Local variable:
Variables that are declared with in methods and it will have scope with in that method
Instance variable:
Variables that are declared with in Class area but not with in methods are termed as Instance variables. It can be used by all the methods inside that class. It denotes the state of that specific class.
Static variable:
If the variables is declared as static then it can be used as local. Value of the variable can be changed only in static methods. Modification of static static variable will be reflected in the all the objects or instances using that variable.
What is meant by Datatype ?
Datatype is to denote that what type of data is going to be stored in specific variable. Two different types of datatypes are listed below.
·
primitive data types
·
non-primitive data types
Data Type
|
Default Value
|
Default size
|
boolean
|
false
|
1 bit
|
char
|
'\u0000'
|
2 byte
|
byte
|
0
|
1 byte
|
short
|
0
|
2 byte
|
int
|
0
|
4 byte
|
long
|
0L
|
8 byte
|
float
|
0.0f
|
4 byte
|
double
|
0.0d
|
8 byte
|
selenium training for freshers | selenium training with placement assistance | learn selenium + java from experts | selenium certification training in chennai
Really nice experience you have. Thank you for sharing. It will surely be an experience to someone.
ReplyDeleteDevOps Training in chennai
DevOps Training in Bangalore
You blog post is just completely quality and informative. Many new facts and information which I have not heard about before. Keep sharing more blog posts.
ReplyDeleteTableau Training in Bangalore
DevOps Training in Bangalore
Tableau Training in Chennai
Tableau Training in Bangalore
Really nice experience you have. Thank you for sharing. It will surely be an experience to someone.
ReplyDeleteweb designing training in chennai
web designing training in omr
digital marketing training in chennai
digital marketing training in omr
rpa training in chennai
rpa training in omr
tally training in chennai
tally training in omr
I just recently discovered your blog and have now scrolled through the entire thing several times. I am very impressed and inspired by your skill and creativity, and your "style" is very much in line with mine. I hope you keep blogging and sharing your design idea
ReplyDeleteweb designing training in chennai
web designing training in velachery
digital marketing training in chennai
digital marketing training in velachery
rpa training in chennai
rpa training in velachery
tally training in chennai
tally training in velachery
ReplyDeleteIt would have been the happiest moment for you,
I mean if we have been waiting for something to happen and when it happens we forgot all hardwork and wait for getting that happened.
data science training in chennai
data science training in tambaram
android training in chennai
android training in tambaram
devops training in chennai
devops training in tambaram
artificial intelligence training in chennai
artificial intelligence training in tambaram
mmorpg
ReplyDeleteinstagram takipçi satın al
tiktok jeton hilesi
tiktok jeton hilesi
Antalya Saç Ekimi
takipçi
İNSTAGRAM TAKİPÇİ SATIN AL
mt2 pvp serverler
instagram takipçi satın al
Fon Perde Modelleri
ReplyDeletenumara onay
mobil ödeme bozdurma
HTTPS://NFTNASİLALİNİR.COM
ankara evden eve nakliyat
Trafik sigortası
DEDEKTÖR
web sitesi kurma
Aşk kitapları