Which of the following lines of code create a String variable z and set it equal to the word "Strings are String-y"?
String z = "Strings are String-y";
Consider the following code: String a = "determined"; String b = "learner"; System.out.println(a + "-" + b); What is the output?
determined-learner
Consider the following code: int a = 43; int b = 17; System.out.println(a % b); What is the output?
9
_____ data types can hold many pieces of information at a time.
class
Java allocates a space in memory called a(n) _____.
reference
To define an empty variable, ____ keyword can be used.
null
Which of the following would set the String variable hobby to be completely empty (i.e. not even storing a memory address)?
String hobby = null;
Which of the following are true about class data types? Click all that apply.
can hold multiple pieces of data of different types can be created can be customized
Consider the following code: String a = "first"; String b = a; a = "second"; System.out.println(a + " " + b); What is printed when the code is run?
second first
Consider the following code: String a = "first"; a = "second"; String b = a; System.out.println(a + " " + b); What is printed when the code is run?
second second