Sail E0 Webinar
Question
Which is the predefined method available in Java to convert decimal to binary numbers?
Options:
A .  toBinaryInteger(int)
B .  toBinaryValue(int)
C .  toBinaryNumber(int)
D .  toBinaryString(int)
Answer: Option D


The method toBinaryString() takes an integer argument and is defined in java.lang package. Usage is java.lang.Integer.toBinaryString(int) this returns the string representation of the unsigned integer value.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers