Java Rumblings
Pages
Home
TOC
Spring
Core Java
Design Pattern
Concurrency
Hibernate
Garbage Collection
Exception
Books
Java API
Collections
Reflection
Class Loader
Annotation
Generics
Thursday, 31 March 2011
Conversion from decimal to binary
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment