assignments

This commit is contained in:
2025-04-09 02:32:02 +03:00
parent ec083c6254
commit f0b5074ac7
14 changed files with 798 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
public class demo {
public static void main(String[] args) {
StorageBox<String> box = new StorageBox<>(3);
StorageBox<Integer> box1 = new StorageBox<>(3);
box.addItem("Math");
box.addItem("Java");
box.addItem("Statistics");
box.addItem("capacityTest");
System.out.println();
box.listItem();
System.out.println(" ");
System.out.println();
box.removeItem();
box.removeItem();
box.removeItem();
box.removeItem();
box.removeItem();
box.removeItem();
System.out.println();;
box.listItem();
box1.addItem(1);
box1.addItem(2);
box1.addItem(3);
box1.addItem(4);
box1.listItem();
}
}