What is a stack?
What is a heap?
Two strings store the same message. Is memory used twice?
No. The second string will refer to the first string.
What is the difference here?
String str1 = “Hello”;
String str2 = “Hello”;
String str3 = new String(“Hello”);
String str3 will not have the same reference as str1 or str2.
What does name.equals(object another) do?
Returns true or false if the strings match
What does name.charAt(int index) do?
Returns the character at the index
What does name.compareTo(String another) do?
Compares two strings with <, >, and =.
How can we use backslashes, quotation marks, line breaks, and tabs within strings?
Compare the values based on their Unicode index.
a and b
A and a
Cart and Car
Car and Cart
a < b
A < a
Car = Car
Car < Cart
How do you convert an int to String?
String.valueOf(int)
How do you convert a String to int?
Integer.parseInt(“stringOfNumbers”)
What is the format for most math functions?
Math.functionName(neededVariables)