

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
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
- Related Questions & Answers
- Hexadecimal integer literal in Java
- Generate Random Long type numbers in Java
- Create BigInteger via long type variable in Java
- Need of long data type in C
- What is the default type of a hexadecimal value in MySQL?
- What is Java String literal?
- Is null a literal in Java?
- Floating-point hexadecimal in Java
- What is the size of int, long type in C++ standard?
- Convert long primitive to Long object in Java
- Convert Long into String using toString() method of Long class in java
- Pattern LITERAL field in Java with examples
- What is the size of int, long type as per C++ standard?
- Which MySQL data type is used for long decimal?
- Can we work MongoDB findOne() with long type _id?
Advertisements