Constant-=> Constant is fixed value, that don't
change during the execution of program. Any variable declared to final is called ‘constant'. Thus, constant value must be specified with an initialization when declared & that constant value never be changed.
For Example: For constant we use ‘const' keyword. Single
character or backlash character constant enclosed in single quote marks. String constant enclosed in double quote marks.
const int a=10;
const float f=25.98f;
const char c=‘x';
const String season=“HelloTycoon”;
Java supports various types of constant as:
Numeric constant:
a. Integer constant: e.g.
121, 024,0x3 etc.
b. Real constant: e.g.
0.55, 0.45e4, 1.3e+2 etc.
2. Character constant:
a. Single character constant: e.g.
‘x','3',';' etc.
Java also supports backslash special character constant, that are used in output methods., e.g.
‘\n', ‘\f', ‘\”' etc.
b. String constant: e.g.
“Hellotycoon”, “2020”,”thanks” etc.
TYCOSSS Creations for
---tycoon-creation.blogspot.com
---tycoon creation channel
---tycoon international channel
---tycoonR channel
---excellent2000 on Twitter
---ravish.channdra@gmail.com on Facebook
---ravish_universe@yahoo.co.in on Facebook
(creations, operations & Collections on education, save environment, motivations, technology, programming, economics, IT, management,4D, funny things, crazy things & pictures, universe study, corporeal world, subtle world, world leaders, Suggestions, Supreme world, research, solutions, innovations)
LIKE COMMENT SHARE READ MAIL TWEET DEMAND
change during the execution of program. Any variable declared to final is called ‘constant'. Thus, constant value must be specified with an initialization when declared & that constant value never be changed.
For Example: For constant we use ‘const' keyword. Single
character or backlash character constant enclosed in single quote marks. String constant enclosed in double quote marks.
const int a=10;
const float f=25.98f;
const char c=‘x';
const String season=“HelloTycoon”;
Java supports various types of constant as:
Numeric constant:
a. Integer constant: e.g.
121, 024,0x3 etc.
b. Real constant: e.g.
0.55, 0.45e4, 1.3e+2 etc.
2. Character constant:
a. Single character constant: e.g.
‘x','3',';' etc.
Java also supports backslash special character constant, that are used in output methods., e.g.
‘\n', ‘\f', ‘\”' etc.
b. String constant: e.g.
“Hellotycoon”, “2020”,”thanks” etc.
TYCOSSS Creations for
---tycoon-creation.blogspot.com
---tycoon creation channel
---tycoon international channel
---tycoonR channel
---excellent2000 on Twitter
---ravish.channdra@gmail.com on Facebook
---ravish_universe@yahoo.co.in on Facebook
(creations, operations & Collections on education, save environment, motivations, technology, programming, economics, IT, management,4D, funny things, crazy things & pictures, universe study, corporeal world, subtle world, world leaders, Suggestions, Supreme world, research, solutions, innovations)
LIKE COMMENT SHARE READ MAIL TWEET DEMAND
No comments:
Post a Comment