mirror of
https://github.com/Xevion/contest.git
synced 2025-12-15 16:11:21 -06:00
Stacks finished data/programs/questions
This commit is contained in:
24
other/Stacks/src/Lab13d.java
Normal file
24
other/Stacks/src/Lab13d.java
Normal file
@@ -0,0 +1,24 @@
|
||||
//<2F> A+ Computer Science - www.apluscompsci.com
|
||||
//Name - Ryan Walters
|
||||
//Date - 11 December 2020
|
||||
//Class - Computer Science II PreAP
|
||||
//Lab - Lab 13D
|
||||
|
||||
import static java.lang.System.out;
|
||||
|
||||
public class Lab13d {
|
||||
public static void main(String[] args) {
|
||||
IntStack test = new IntStack();
|
||||
test.push(5);
|
||||
test.push(7);
|
||||
test.push(9);
|
||||
System.out.println(test);
|
||||
System.out.println(test.isEmpty());
|
||||
System.out.println(test.pop());
|
||||
System.out.println(test.peek());
|
||||
System.out.println(test.pop());
|
||||
System.out.println(test.pop());
|
||||
System.out.println(test.isEmpty());
|
||||
System.out.println(test);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user