Javatpoint Logo
Javatpoint Logo

Java Byte equals() method

The equals() method of Java Byte class compares the given object to the specified object.

Syntax:

Parameters:

The parameter 'obj' represents the object to be compared.

Overrides

The equals() method overrides equals in class Object

Return Value

This method returns:

  • Boolean value true, if both the objects are identical.
  • Else, it returns false.

Example 1

Test it Now

Output:

67 and 127 are not equal.

Example 2

Output:

Enter your 2-digit password : 11
Congratulations! Your password Matched.

Example 3

Test it Now

Output:

Error:(7, 17) java: integer number too large: 09

Next TopicJava Byte





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback

  • Send your Feedback to feedback@javatpoint.com

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA