Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to check whether string is in binary form?.

807569Jun 16 2006 — edited Jun 16 2006
Hello

I'd like my program check whether string is in binary form or not. For example, I've got
following string "00000001" (binary string), that is 1 in ints but I can write to the input of my program, let's say "aggsasfaa" and this is string also but cannot be converted to int.
I'd like my program discover whether string consists of only 0 and 1and is eight characters long. How to do it?.

Cheers
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 14 2006
Added on Jun 16 2006
11 comments
498 views