Java Byte.longValue()

Syntax

Byte.longValue() has the following syntax.

public long longValue()

Example

In the following code shows how to use Byte.longValue() method.


public class Main {
  public static void main(String[] args) {
    Byte byteObject = new Byte("10");
/*from w ww .  j  a  v a  2 s.  co  m*/

    long l = byteObject.longValue();
    System.out.println("long:"+l);
  }
}

The output:





















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable