Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Hexadecimal literal of type long in Java
Hexadecimal literal of type long is represented as −
long hexLong = 0XABL;
For Hexadecimal, the 0x or 0X is to be placed in the beginning of a number.
Note − Digits 10 to 15 are represented by a to f (A to F) in Hexadecimal
Example
public class Demo {
public static void main(String []args) {
long hexLong = 0XABL;
System.out.println("Hexadecimal literal of type long: "+hexLong);
}
}
Output
Hexadecimal literal of type long:171
Advertisements
