no need to explain. True or False
1. A constructor is a special Class member method. It is automatically called when an object of the class is created. It can also be called more than once after the object is created.
2. In Java, the new operator is used to create an instance/object of a class in the heap.
3. A reference variable is a memory location contains an address of an object stored in the stack.
4. Encapsulation and abstraction are both the pillars of Object-Oriented Programming. Abstraction means that a programmer hides all but the relevant data about an object in order to reduce the complexity.
5. The body of a while loop repeats as long as the loop condition is false, whereas the body of a do while loop repeats as long as the loop condition it true
Answer 1:True
constructor will be called when ever an object is created. if n
objects is created than n times wil be called
Answer 2:true
we create object using new operator
Example:
Student s = new Student();
Answer 3:True
Answer 4: True
Answer 5: False
both loops will repeat it is true, once it is false than loops will
stop iterating
NOTE : PLEASE COMMENT BELOW IF YOU HAVE CONCERNS.
I AM HERE TO HELP YOUIF YOU LIKE MY ANSWER PLEASE RATE AND HELP ME
IT IS VERY IMP FOR ME
Get Answers For Free
Most questions answered within 1 hours.