Ap-Computer-Science-A-Java-Quick-Reference 0
Ap-Computer-Science-A-Java-Quick-Reference 0
Accessible methods from the Java library that may be included in the exam
Class Constructors and Methods Explanation
String Class
String(String str) Constructs a new String object that represents the same sequence of
characters as str
static double sqrt(double x) Returns the positive square root of a double value
static double random() Returns a double value greater than or equal to 0.0 and less than 1.0
ArrayList Class
int size() Returns the number of elements in the list
E remove(int index) Removes element from position index, moving elements at position
index + 1 and higher to the left (subtracts 1 from their indices) and subtracts 1
from size; returns the element formerly at position index
Object Class
boolean equals(Object other)
String toString()