Question: help i need to fix this program using jgrasp // Allows user to enter a series of words // and displays them in reverse order
help i need to fix this program using jgrasp
// Allows user to enter a series of words // and displays them in reverse order import javax.swing.*; public class DebugEight4 { public static void main(String[] args) { int x = 0, y; String array[] = new String[100]; String entry; final String STOP = "XXX"; StringBuffer message = new StringBuffer("The words in reverse order are "); entry = JOptionPane.showInputDialog(null, "Enter any word " + "Enter " + STOP " when you want to stop"); while(!(entry.equals(STOP)) { array[STOP] = entry; entry = JOptionPane.showinputDialog(null, "Enter another word " + "Enter " + STOP + " when you want to stop"); } for(y = 0; y > 0; ++y); { message.append(array[y]); message.append(" "); } JOptionPane.showMessageDialog(null, message); } }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
