__ is invoked to create an object instance. a. The main method b. A method with
ID: 3840634 • Letter: #
Question
__ is invoked to create an object instance. a. The main method b. A method with a return type c. A constructor d. A method with a void return type For JUnit, which annotation means to run the method ONCE... at the beginning of all the tests? a. @before b. @after c. @beforeclass d. @setup This class will cluster items together (example: RadioButtons) a. Group b. ToggleGroup c. ButtonGroup d. ControlGroup What is 'x' after evaluating: int x= (4 > 1) ? 2: 3; a. 5 b. 2 c. 3 d. 4 What is using the same method name, with a different parameter list? a. Overriding b. Overloading c. Abstraction d. Encapsulation Consider the following class declaration: public abstract class Employee What statements are true? a. Class can't be instantiated b. You must inherit the class to use it c. Must contain abstract methods d. Answers A & B e. Answers A, B, CExplanation / Answer
1.
Constructor is invoked to create an object instance. Depending on the object default and parametrized constructor are invoked.
Thus, the correct answer is c. A constructor.
2.
@beforeclass annotation is used before the static method to run the method only once before any test case execution.
Thus, the correct answer is c. @beforeclass
3.
ButtonGroup is used to cluster item together. If two radio buttons are grouped together the user can select only one.
Thus, the correct answer is c. ButtonGroup.
4.
int x= (4 > 1) ? 2: 3;
Since, 4>1 the condition is true.
Therefore, the value 2 will be stored in the variable x.
Thus, the correct answer is b. 2.
5.
Overloading of function allows to create the functions with the same function name and with different parameters list. Overloaded function are distinguished by their parameter list.
Thus, the correct answer is b. Overloading.
6.
Properties of abstract class are:
Class can't be instantiated
You must inherit the class to use it.
Abstract class may contain abstract method.
Thus, the correct answer is d. Answers A & B.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.