+ 6
What is literal in java
How
8 odpowiedzi
+ 9
Literals are Compile time constant values that cannot be changed
e.g
String s = "a" // "a" is a string litetal, s is a variable
As long as you use double quote it's string literal
int x = 2; // 2 is an int literal, x is a variable
+ 6
Something like a constant.
+ 6
Hope it is clear now.
+ 4
https://en.m.wikipedia.org/wiki/Literal_(computer_programming)
+ 3
Thanku.. But I didn't get clarity..
+ 2
Yes
0
int a=5; 5 is a literal for int
char a='j'; j is literal