Example usage for java.lang Byte compareTo

List of usage examples for java.lang Byte compareTo

Introduction

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

Prototype

public int compareTo(Byte anotherByte) 

Source Link

Document

Compares two Byte objects numerically.

Usage

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));
}