Results 1 to 2 of 2

Thread: What is literal in Java?

  1. #1
    Join Date
    Jul 2021
    Posts
    191

    Default What is literal in Java?

    What is literal in Java?

  2. #2
    Join Date
    Apr 2020
    Posts
    704

    Default

    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. I am giving below, a representation which can explain you possibly more efficiently.

    Data Type Possible Literal

    int 33
    byte 6
    short 94
    long 53092437L
    char 'c'
    boolean true or false
    float 1.053f
    double 3.03532453

Similar Threads

  1. What is Java?
    By stuartspindlow in forum Web Design Solutions
    Replies: 11
    Last Post: 02-29-2024, 02:29 PM
  2. What's Java best used for?
    By kajalescort in forum Web Design Solutions
    Replies: 2
    Last Post: 06-14-2022, 11:34 AM
  3. What does the name Java mean?
    By kajalescort in forum Web Hosting Solutions
    Replies: 0
    Last Post: 10-26-2021, 06:09 PM
  4. What is Java?
    By stuartspindlow in forum Software & Hardware
    Replies: 25
    Last Post: 02-26-2021, 11:05 AM
  5. What Java host would be better for me?
    By President in forum Web Hosting Solutions
    Replies: 9
    Last Post: 03-29-2013, 01:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •