VOOZH
about
URL: https://www.geeksforgeeks.org/java/double-longvalue-in-java-with-examples/
⇱ Double longValue() in Java with Examples - GeeksforGeeks
👁 geeksforgeeks
Courses
Tutorials
Interview Prep
Java Tutorial
Advanced Java
Interview Questions
Exercises
Examples
Quizzes
Projects
Cheatsheet
DSA in Java
Java Collection
Double longValue() in Java with Examples
Last Updated :
11 Jul, 2025
The
longValue()
method of
Double
class is a built in method to return the value specified by the calling object as long after type casting.
Syntax
DoubleObject.longValue()
Parameters :
It takes no parameters.
Return type :
It returns an
long
value i.e. the type casted value of the DoubleObject.
Below is the implementation of the above method.
Code 1 :
Output
1022
Code 2 :
Output
-1023
Comment
Article Tags:
Article Tags:
Java
Java-Library
Java-lang package
Explore
Basics
Introduction
3 min read
Fundamentals
10 min read
Methods
7 min read
Arrays
7 min read
Strings
5 min read
Regular Expressions
3 min read
OOP & Interfaces
Classes and Objects
6 min read
Access Modifiers
4 min read
Constructors
5 min read
OOP
6 min read
Packages
2 min read
Interfaces
6 min read
Collections
Collections
12 min read
Collections Class
9 min read
Collection Interface
5 min read
Iterators
4 min read
Comparator Interface
4 min read
Exception Handling
Exception Handling
6 min read
Try Catch Block
3 min read
Final, Finally & Finalize
4 min read
Chained Exceptions
3 min read
Null Pointer Exception
4 min read
Method Overriding
4 min read
Java Advanced
Multithreading
3 min read
Synchronization
8 min read
File Handling
6 min read
Method References
3 min read
8 Stream
7 min read
Networking
6 min read
JDBC
5 min read
Memory Management
3 min read
Garbage Collection
6 min read
Memory Leaks
3 min read
Practice Java
Interview Questions
15+ min read
Programs
7 min read
Practice Problems
5 min read
Quiz
1 min read
Project Ideas
15+ min read
Courses
Java Backend Development Course
2 min read
Java Programming - Self Paced
2 min read
DSA Java Course
2 min read