编程知识 cdmana.com

Functional description of the shortValue() method of the Java.lang.Byte class

From:

Java.lang.ByteFunction description of the shortValue() method of the class

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

Function of the shortValue() method

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

 Returns the short value of a bytes object

shortValue syntax

shortValue syntaxpublic short shortValue()parameternonereturn valueReturns the value of the object converted to short

Example:

package com.java265.other;import org.junit.Test;public class other {/*** java265.com test example sharing*/@Testpublic void test() {/*** Example of Byte class shortValue method*/Byte b1 = Byte.decode("100");System.out.println(b1.shortValue());}}------Run the above code, the following information will be output----100

版权声明
本文为[qq_25073223]所创,转载请带上原文链接,感谢
https://cdmana.com/2022/266/202209230828163796.html

Scroll to Top