[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Undefined array key 12
[phpBB Debug] PHP Warning: in file [ROOT]/ext/lmdi/autolinks/event/listener.php on line 237: Trying to access array offset on value of type null
Answer Happy • public static void main(String args[]) ( Stack strStack = new Stack(); String str char ch for (int i = 0; i<10; i++) [ s
Page 1 of 1

public static void main(String args[]) ( Stack strStack = new Stack(); String str char ch for (int i = 0; i<10; i++) [ s

Posted: Fri Jul 01, 2022 5:34 am
by answerhappygod
Public Static Void Main String Args Stack Strstack New Stack String Str Char Ch For Int I 0 I 10 I S 1
Public Static Void Main String Args Stack Strstack New Stack String Str Char Ch For Int I 0 I 10 I S 1 (20.01 KiB) Viewed 37 times
public static void main(String args[]) ( Stack strStack = new Stack(); String str char ch for (int i = 0; i<10; i++) [ str = JOptionPane.showInput Dialog("Enter an alphabet"); ch str.charAt(0); if(! (ch == 'u')) [ || ch == 'e' ||ch == '1'||ch == strStack.push(str); System.out.print (str } } //DIAGRAM #1 System.out.printin(); for (int i=0; i <strStack.size(); 1+ 3) strStack.pop(); //DIAGRAM #2 while (!strstack.isEmpty()) System.out.println(atrstack.pop()); end of main d) Draw the TWO diagram of strStack to show its content when the program executes at DIAGRAM #1 and DIAGRAM #2. (4 marks)