Example usage for java.lang Byte Byte

List of usage examples for java.lang Byte Byte

Introduction

In this page you can find the example usage for java.lang Byte Byte.

Prototype

@Deprecated(since = "9")
public Byte(String s) throws NumberFormatException 

Source Link

Document

Constructs a newly allocated Byte object that represents the byte value indicated by the String parameter.

Usage

From source file:Main.java

public static void main(String[] args) {
    Byte bObj = new Byte("10");

    String str = bObj.toString();
    System.out.println(str);//from   w w w  . j  a  v a  2s  .  c om
}

From source file:Main.java

public static void main(String[] args) {

    Byte byte1 = new Byte("1");
    Byte byte2 = new Byte("2");
    System.out.println(byte1.equals(byte2));
}

From source file:Main.java

public static void main(String[] args) {

    Byte byte1 = new Byte("1");
    Byte byte2 = new Byte("2");
    System.out.println(byte1.compareTo(byte2));
}

From source file:Main.java

public static void main(String[] args) {
    Byte bObj1 = new Byte("100");
    System.out.println(bObj1);//  w  w  w. j av a  2 s.co m
    Byte bObj2 = Byte.valueOf("100");
    System.out.println(bObj2);
}

From source file:Main.java

public static void main(String[] args) {
    Byte byteObject = new Byte("10");
    float f = byteObject.floatValue();
    System.out.println("float" + f);

}

From source file:Main.java

public static void main(String[] args) {
    Byte byteObject = new Byte("10");

    String str = byteObject.toString();
    System.out.println("str:" + str);
}

From source file:Main.java

public static void main(String[] args) {
    Byte byteObject = new Byte("10");

    short s = byteObject.shortValue();
    System.out.println("short:" + s);
}

From source file:Main.java

public static void main(String[] args) {
    Byte byteObject = new Byte("10");
    byte b = byteObject.byteValue();
    System.out.println("byte:" + b);

}

From source file:Main.java

public static void main(String[] args) {
    Byte byteObject = new Byte("10");

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

From source file:Main.java

public static void main(String[] args) {

    Byte byteObject = new Byte("100");
    System.out.println(byteObject);

}