WEB DEVELOPER SITE
PHP7
 

Java - xxxValue() Method


xxxValue() Converts the value of this Number object to the xxx data type and returns it.


Syntax

Here is a separate method for each primitive data type −

byte byteValue()
short shortValue()
int intValue()
long longValue()
float floatValue()
double doubleValue()

Parameters

Here is the detail of parameters −

  • All these are default methods and accepts no parameter.

Return Value

  • This method returns the primitive data type that is given in the signature.

Run example »