MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/AskReddit/comments/1wztost/what_is_literals_in_java/
r/AskReddit • u/[deleted] • Oct 07 '26
6 comments sorted by
1
I think you should raise the question in some yech channel or just google it
Anything between quotation marks or apostrophes. If it's a char or a String, it's a literal. If you're asking about stuff like being alphanumeric or such, there are functions to help with that.
Java literals are basically fixed values written directly in your code, like 10, "hello", or true.
Once you understand literals, Java syntax starts making a lot more sense.
1
u/MorningReader01 Oct 07 '26
I think you should raise the question in some yech channel or just google it
1
u/West-Forever8365 Oct 07 '26
Anything between quotation marks or apostrophes. If it's a char or a String, it's a literal. If you're asking about stuff like being alphanumeric or such, there are functions to help with that.
1
u/Fazuno78 Oct 07 '26
Java literals are basically fixed values written directly in your code, like 10, "hello", or true.
1
u/Xurvex69 Oct 07 '26
Once you understand literals, Java syntax starts making a lot more sense.