Javatpoint Logo
Javatpoint Logo

Java Byte hashCode() method

The hashCode() method of Java Byte class returns a hash code for this Byte.

Syntax:

Parameters:

The parameter 'value' represents a value whose hash code is to be determined.

Overrides

The hashCode() method overrides hashCode in class Object.

Return Value

This method returns a hash Code value for this Byte.

Example 1

Test it Now

Output:

Hash Value = 0
Hash Value = 12
Hash Value = -1

Example 2

Test it Now

Output:

Hash Code = 123

Example 3

Test it Now

Output:

Error:(7, 18) java: byte cannot be dereferenced

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