Question: public class MyClass { public static void main(String args[]) { int i=0; int a[]={0,1,2,3,4,-2,-7,12,73,7}; for(i=0;i

public class MyClass { public static void main(String args[]) { int i=0; int a[]={0,1,2,3,4,-2,-7,12,73,7}; for(i=0;i 4){ if (value%2==0){ System.out.println("The invalid value " + value + " was entered, which is greater than 4 and even."); } else{ System.out.println("The invalid value "+ value +" was entered, which is greater than 4 and odd."); } } else{ if (value%2==0){ System.out.println("The invalid value "+ value +" was entered, which is less than 0 and even."); } else{ System.out.println("The invalid value " + value +" was entered, which is less than 0 and odd."); } } } } }

You are missing the supplemental project files, which allows the switch graphical display to happen. The code should show a dialog window that prompts the user for a value and then displays the resulting output. You've got the guts of the logic here, but the graphical portion. Essentially, you have no user interface.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!