AP CS A Midterm Review
Across
- 1. when two objects reference the same memory location
- 3. keyword used to invoke a constructor
- 4. the largest possible value for x when int x = (int)(Math.random()*5+1);
- 8. data structure that requires length and type to be declared when the structure is initialized
- 9. random() is an example of this type of method for the Math class
- 11. values passed to a method when the method is called
- 18. formal implementation of an object
- 19. what is printed after this line: System.out.println("Hello there!".substring(6,10));
- 21. int, char, and boolean data types
- 25. would return true if this is equal to the input parameter, false otherwise
- 26. (int) and (double) are examples of these
- 28. where to find .abs(int x), .random(), .pow(double base, double exponent), or .sqrt(double x)
- 29. 4 % 0
- 30. private data members
- 31. instance of a class with defined attributes
- 32. used when a reference is not associated with any object
- 33. methods that return Strings to report the state of an object, used as parameters in System.out.println,
- 35. used, along with the object name, to call non-static methods
Down
- 2. "\n", "\\", and "\t" for example
- 5. data structure that holds only objects
- 6. best type of loop to use when you are not sure how many times it will need to repeat
- 7. methods with the same name but different signature
- 10. what happens when an int is stored in an ArrayList
- 12. largest index for String s = "stringsarefun";
- 13. if int x = Integer.MAX_VALUE+1, x could be an example of what type of error?
- 14. Integer or Double, for example
- 15. names and types of values used in a method header
- 16. visibility classification for helper methods
- 17. written in method signature if nothing is returned
- 20. technique where implementation details are kept hidden from the user
- 22. method with the same name as the class
- 23. type of for loop often used to access elements of a data structure with an iterator (like an array or arraylist)
- 24. x if int x = 1/4;
- 27. casual way to describe a method that allows a client class to modify instance data
- 34. y if int y = (int)(2+4.0/0.5) + 1;