Question: Java Program Write a program that inputs a word representing a binary number (0s and 1s). First, your program should check that it is indeed
Java Program 
Write a program that inputs a word representing a binary number (0s and 1s). First, your program should check that it is indeed a binary number, that is, the number contains only 0s and 1s. If that is not the case, your program should output that the number is not a valid binary number. If that word contains exactly two 1s, your program should output that that word is "accepted, " otherwise that it is "rejected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
