Literal

A value written directly in source code, such as 42, true, or "hello".

What is Literal in Java?

Literal — A value written directly in source code, such as 42, true, or "hello".

class Order {
    int itemCount = 3;
    double price = 4.50;
    char size = 'M';
    boolean paid = true;
}

Level: Novice · More Java terms at this level

Updated

In other subjects