Java Quiz (Set 5) Java Quiz (Set 5) 1 / 10 Inheritance represents HAS-A relationship. IS-A relationship. 2 / 10 A class always has a default constructor. True False 3 / 10 What is class variable? class variables are static variables within a class but outside any method. class variables are variables defined inside methods, constructors or blocks. class variables are variables within a class but outside any method. None of the above. 4 / 10 What is instance variable? Instance variables are static variables within a class but outside any method. Instance variables are variables defined inside methods, constructors or blocks. Instance variables are variables within a class but outside any method. None of the above. 5 / 10 What is local variable? Variables defined inside methods, constructors or blocks are called local variables. Variables defined outside methods, constructors or blocks are called local variables. Static variables defined outside methods, constructors or blocks are called local variables. None of the above. 6 / 10 What is an immutable object? An immutable object can be changed once it is created. An immutable object can't be changed once it is created. An immutable object is an instance of an abstract class. None of the above. 7 / 10 What is an Interface? An interface is a collection of abstract methods. Interface is an abstract class. Interface is an concrete class. None of the above. 8 / 10 What is Encapsulation? Encapsulation is a technique to define different methods of same type. Encapsulation is the ability of an object to take on many forms. Encapsulation is the technique of making the fields in a class private and providing access to the fields via public methods. None of the above. 9 / 10 What is Abstraction? Abstraction is a technique to define different methods of same type. Abstraction is the ability of an object to take on many forms. It refers to the ability to make a class abstract in OOP. None of the above. 10 / 10 What is inheritance? It is the process where one object acquires the properties of another. inheritance is the ability of an object to take on many forms. inheritance is a technique to define different methods of same type. None of the above. Your score isThe average score is 0% 0% Restart quiz