View Full Version : What is literal in Java?
kajalescort
10-26-2021, 03:19 PM
What is literal in Java?
Cyril30
10-27-2021, 01:07 AM
Literal in Java is a synthetic representation of boolean, numeric, character, or string data. It is a means of expressing particular values in the program, such as an integer variable named ''/count is assigned an integer value in the following statement. int count = 0; A literal '0' represents the value zero.
Alina Fernandiz
10-27-2021, 02:19 AM
Literals are the actual values that are of specific data type. For eg. if you say that a car is a data type, then range rover is a literal. Formal explanation is that int is a data type and say the value 7 is a literal.
Powered by vBulletin® Version 4.2.4 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.