Answer:
All are True
Explanation:
a. A constructor must have the same name as that of a class. For example
public class MyFirstClass{ // this is the class name
public MyFirstClass() } // the constructor having the same name as class.
b. Constructors never have a return type not even void because it is only used to initialize the values of data members of the class when the object of the class is created so constructors are not directly called hence they do not need to have a return type.
c. Constructors are invoked using the new operator.
When the new object is created the constructor is invoked in order to initialize the variables of a class. The memory is allocated to the object and then the constructive is invoked for the purpose to initialize the object.
The correct answer to the question that is being stated above is FALSE.
The statement is false because lenders do not always accept applications for credit. Lenders always consider credit history of the applicant. If the applicant has a good credit history background, then he qualifies.
I. is syntactically correct if genderString exists. if genderString, for example, is "Male", then char gender would be the character at index 0 (the first character), meaning 'M'.
II. is incorrect. It is using the comparison operator (==) instead of the assignment operator (=). It is also setting a boolean variable to a String value of 'F'. Boolean values cannot hold string values, and can only hold true & false.
III. is correct if ageString only contains numbers (presumably, it does, as it's called ageString). Integer.parseInt is a function that converts String values to integer values if the string values only contain numerical characters.
The answer in this case should be B. II only.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The correct answer to this question is initialization.
When you write a variable in a program, for example int firstNumber. The integer variable firstNumber is declaring in the program.
when you assign a data value to a variable in a program is referred to as initialization. for example:
firstNumber=10;
You can declare and initialize the variable in one statement such as:
int firstNumber=10;