import java.awt.Color; import java.util.ArrayList; /* * Will you have full page code? * Will we draw memory boxes? * */ public class Exam2Rewiew { // static means not part of an object public static int add(int x, int y) { // X and y are parameters return x + y; } public static void main(String[] args) { ArrayList list; list = new ArrayList(); list.add(Color.RED); ArrayList intList = new ArrayList(); intList.add(34); intList.add(0, 11); intList.add(1, 13); System.out.println(intList); int w = Exam2Rewiew.add(3, 4); // 3 and 4 are arguments int x = Exam2Rewiew.add(3, w); // 3 and 7 are arguments Neanderthal n = new Neanderthal(); System.out.println(n.getHeight()); System.out.println(Neanderthal.factorial(7)); System.out.println(n.factorial(7)); } }