Java Byte.equals(Object obj)
Syntax
Byte.equals(Object obj) has the following syntax.
public boolean equals(Object obj)
Example
In the following code shows how to use Byte.equals(Object obj) method.
public class Main {
public static void main(String[] args) {
/*w ww .ja v a 2 s . co m*/
Byte byte1 = new Byte("1");
Byte byte2 = new Byte("2");
System.out.println(byte1.equals(byte2));
}
}
The output: