What will be the output of the following Java code?
class binary
{
public static void main(String args[])
{
int num = 17;
System.out.print(Integer.toBinaryString(num));
}
}
class binary
{
public static void main(String args[])
{
int num = 17;
System.out.print(Integer.toBinaryString(num));
}
}A. 1001
B. 10011
C. 11011
D. 10001
Answer: Option D

Join The Discussion