CSIS 212 Quiz 2 - Question and Answers | VERIFIED SOLUTION
CSIS 212 Quiz 2 - Question and Answers • Question 1 1 out of 1 points You can declare new classes as needed; this is one reason Java is known as a(n) ________ language. Selected Answer: extensible • Question 2 1 out of 1 points The format specifier %.2f specifies that two digits of precision should be output ________ in the floating-point number. Selected Answer: to the right of the decimal point • Question 3 1 out of 1 points A class that creates an object of another class, then calls the object’s methods, is called a(n) ________ class. Selected Answer: driver. • Question 4 1 out of 1 points Which of the following statements is false? Selected Answer: Variables of type boolean are initialized to true. • Question 5 1 out of 1 points Which of the following statements is false? Selected Answer: Classes in the same package are implicitly imported into main. • Question 6 1 out of 1 points Which of the following statements is true? Selected Answer: Variables or methods declared with access modifier private are accessible only to methods of the class in which they’re declared. • Question 7 1 out of 1 points Which of the following statements is false? CSIS 212 Quiz 2 - Question and Answers Selected Answer: To call a method of an object, follow the object name with a comma, the method name and a set of parentheses containing the method’s arguments. • Question 8 1 out of 1 points Each class you create becomes a new ________ that can be used to declare variables and create objects. Selected Answer: type. • Question 9 1 out of 1 points Which of the following statements is false? Selected Answer: Classes often provide public methods to allow the class’s clients to set or get private instance variables; the names of these methods must begin with set or get. • Question 10 1 out of 1 points Types in Java are divided into two categories. The primitive types are boolean, byte, char, short, int, long, float and double. All other types are ________ types. Selected Answer: reference • Question 11 1 out of 1 points Which of the following statements is false? Selected Answer: Instance variables can be declared anywhere inside a class. • Question 12 1 out of 1 points Which of the following statements is false? Selected Answer: Keyword null indicates that a method will perform a task but will not return any information. • Question 13 1 out of 1 points Java requires a ________ call for every object that’s created. Selected Answer: constructor • Question 14
Document information
- Uploaded on
- January 17, 2022
- Number of pages
- 4
- Written in
- 2021/2022
- Type
- Exam (elaborations)
- Contains
- Questions & answers