Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to take binary input in java

String input="1001010101010101";
int len=input.length();
BitSet bs=new BitSet(len);
int i=len-1;
for (char c:input.toCharArray()) 
	bs.set(i--, c=='1'?true:false);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #binary #input #java
ADD COMMENT
Topic
Name
2+8 =