Java Literals
Literals
A constant value that can be assigned to the variable is called a literal.
Keywords
Words that are reserved and used by the Java compiler. They cannot be used as an Identifier.

package com.company;
public class CWH_04_literals {
public static void main(String[] args) {
byte age = 34;
int age2 = 56;
short age3 = 87;
long ageDino = 5666666666666L;
char ch = 'A';
float f1 = 5.6f;
double d1 = 4.66;
boolean a = true;
System.out.print(age);
String str = "Harry";
System.out.println(str);
}
}
Output
34
Harry
Harry