Literal and types of integer literals in Java.

Q7. What are literal? How many types of integer literals are available in Java?

Ans. Literals (often referred to as constants) are data items that are fixed data values.

Java allows three types of integer literals:

  1. Decimal (base 10)
  2. Octal (base 8)
  3. Hexadecimal (base 16)

Leave a Reply

Your email address will not be published. Required fields are marked *

110 Views
%d bloggers like this: