A java blog with a collection of examples and tutorials on Java and related technologies. (Under maintenance with continuous updates)
Be in touch with java jazzle or k2java.blogspot.com.
You can convert a decimal to binary using toBinaryString() method of Integer wrapper class as follows.
int i = 42;
String binstr = Integer.toBinaryString(i);
No comments:
Post a Comment