java.lang.String.valueOf(long lnum)

The given example will discuss about valueOf(long lnum) method of Java String class.


 
Ads

The given example will discuss about valueOf(long lnum) method of Java String class.

According to Java's Primitive Data Types long is ...

8 bytes signed (two's complement). That ranges from -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807.

In this example we are going to display the min range of long in Java using valueOf(long lnum) method.

a simple example:

public static void main(String[] args)
{
String minimumStr = String.valueOf(Long.MIN_VALUE);

// long values.
System.out.println(minimumStr );
}

the output is:

-9223372036854775808

Advertisements

Share on Google+Share on Google+

java.lang.String.valueOf(long lnum)

Posted on: March 22, 2005 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: java.lang.String.valueOf(long lnum)  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads