Predict the outcome of the following program: import java.util."; public class StackTest public static void main(String
Posted: Fri Jul 01, 2022 5:37 am
Predict the outcome of the following program: import java.util."; public class StackTest public static void main(String [Jargs) |{ Stack <Integer s = new Stack <Integer> : int [] data = new int[] { 10, 20, 30, 40, 50, 60, 70): for (int i = 0; i < data.length; i++) |{ s.push(data[i++]); if (i < data.length) s.push (data); System.out.print (s.pop()+""); } while(!s.empty()) System.out.print(s.pop()+".");