This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package dynamicarray; | |
import java.util.Scanner; | |
// Assume that for a dynamic array of size 2 and capacity 4 we perform the following sequence of operations: | |
// add 5 | |
// add 7 | |
// add 9 | |
// insert 3 1 | |
// insert 6 2 | |
// Here, add x means that we append an element to the array, insert x i means that we insert x to the array at the i-th index (assuming zero-based indexing). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package machine; | |
public class CoffeeMachine { | |
public static void main(String[] args) { | |
System.out.println("Hello World!"); | |
} | |
} |