String | StringBuilder | Arrays | ArrayList | Miscellaneous |
---|---|---|---|---|
What is the equals() method?
This is the method used to compare two Strings.
|
What is 'append()'?
For classes that haven't overridden the toString method, this StringBuilder method appends the output from the default implementation of method toString defined in class Object.
|
What is contiguous/continuous memory?
Array member access offers improved access speed because of this memory layout.
|
What is 'java.util'?
The package for this class.
|
What is the diamond operator?
The name of the operator on the right where you were previously required to specify the data type.
ArrayList |
What is 'immutable'?
Since Java Strings cannot be changed, we call them this.
|
What is something that doesn't exist?
The trim() method of StringBuilder.
|
What are primitive and object data types?
These are the two types of data that an array can store.
|
What is an Object array?
This is the underlying data type used to store the data of the ArrayList.
|
What is 'creates a new length of the same size and copies the references of the values to the new array'?
Calling toArray() on an ArrayList does this to return the appropriate object.
|
What is the 'new' operator?
String objects created using this operator always refer to separate objects, even if they store the same sequence of characters.
|
What is 'subSequence()'?
This method is used to return a CharSequence that represents a substring of the StringBuilder value.
|
What is 'int'?
The data type used to specify the size of a dimension of an array.
|
What is the enhanced for loop?
The one iteration method that cannot be used if you are removing items from an ArrayList.
|
What is 'the comparison of the reference of the two objects'?
This is the default implementation of the equals() method of Object.
|
What is 'null'?
The literal value for String.
|
What are:
1. The position insertion point 2. The char[] to be inserted 3. The starting position in the char[] 4. The length to be copied from the char[] ?
The names of the arguments of this StringBuilder method call:
StringBuilder sb = new StringBuilder("123"); char[] name = {'J', 'a', 'v', 'a'}; sb.insert(1, name, 1, 3); |
What is ArrayIndexOutOfBoundsException?
The error thrown when you attempt to access a nonexistent array index position.
|
What is 'clear()'?
Use this method to remove all elements of an ArrayList.
|
What is 'public boolean equals(Object object)'?
This is the method signature of the equals() method.
|
What are the 'start position' and the 'end position'?
The two arguments of the String.substring() method.
|
What is 'StringBuffer'?
The thread-safe version of StringBuilder.
|
What is 'length()'?
This method returns the number of components of the array.
|
What is 'true'?
An ArrayList can contain duplicate values. (T/F)
|
What is a shallow copy?
Cloning an ArrayList performs this type of copy.
|