Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

<script src=\"http://pastebin.com/embed_js.php?i=NzPiDtvv\"></script> I have lis

ID: 3540248 • Letter: #

Question

<script src="http://pastebin.com/embed_js.php?i=NzPiDtvv"></script>


I have listed my work on the link above. Im having trouble with this part. Its giving me an error that I cant compare String array to string. I know I could list the range to make it easier. But this is how I want to do it. Please let me know how I can mod this piece of code.


String [] numbers= {"0","1","2","4","5","6","7","8","9"};
           
            for (int i = 0; i <= input.length(); i++)
            {
                for (int j = 0; j <= numbers.length; j++)
                {
                if (numbers [j] == input[i])   
                {   
                    break;                   
                }
                else
                {
                    if(i == input.length())
                    {
                        System.out.println("Try again");
                    }
                }
                }

Explanation / Answer

check .equalsIgnorecaseMethod in java for comparing two strings


Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote