Java Double byteValue() MethodThe byteValue() method of Java Double class returns the value of this double as a byte after a narrowing primitive conversion. The byteValue () method of class Double overrides the byteValue () method of class Number. SyntaxReturn valueThis method returns the double value represented by this object that has been converted to type byte. Example 1Output: Difference = 0.4399999999999995 Difference = 0.0 Example 2Output: Sum = 88.12 Sum = 88 Example 3Output: double value = 10.5 Converted byte value by type casting = 10 Example 4Output: Enter your digit 56.7 After rounding off the number becomes : 57 Next TopicJava-double-compare-method |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India