Java. Lang. Byte class of hashCode () method of the function

qq_25073223 2022-09-23 08:36:41 阅读数:594

java.javalang.langbyte

From:
Function description of the hashCode() method of the Java.lang.Byte class

The following author will describe the function introduction of the hashCode() method in the Java.lang.Byte class, as follows:

Function of hashCode() method

function of java.lang.Byte.hashCode():

 Returns the hash code corresponding to the Byte object

hashCode syntax

hashCode syntaxpublic int hashCode()parameternonereturn valueReturns the hashCode value of the object, usually the same as the intValue value

Example:

package com.java265.other;import org.junit.Test;public class other {/*** java265.com test example sharing*/@Testpublic void test() {/*** Example of Byte class hashCode method*/Byte b1 = Byte.decode("100");Byte b2 = Byte.decode("102");System.out.println(b1.hashCode());System.out.println(b2.hashCode());}}------Run the above code, the following information will be output----100102
copyright:author[qq_25073223],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/266/202209230828163634.html