- Predict The Outcome Of The Following Program Import Java Util Public Class Stacktest Public Static Void Main String 1 (89.78 KiB) Viewed 37 times
Predict the outcome of the following program: import java.util."; public class StackTest public static void main(String
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Predict the outcome of the following program: import java.util."; public class StackTest public static void main(String
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()+".");