TEST 2 28 Jan,2022 boomtecho2@gmail.comLeave a comment Please enter your email: 1. Data Abstraction means process of hiding certain details and showing only essential information to the user Process of binding information Process of exception handling and find the error none 2. Which abstract class is the super class of all classes used for writing bytes ? Writer Filewriter Charwriter Output stream 3. Which keyword is used to for define abstract class ? Abstract abst abstract abstract class 4. What is the syntax of abstract class in java? abstract A{} abstract class A abstract class A{} abstract class A[] 5. Which of these is not abstract? Thread AbstractList List None of the Mentioned 6. Which of these packages contains abstract keyword? java.lang java.util java.io java.system 7. Which of these is not a correct statement? Every class containing abstract method must be declared abstract Abstract class defines only the structure of the class not its implementation Abstract class can be initiated by new operator Abstract class can be inherited 8. A class which is declared with the ________ keyword is known as an abstract class in Java. abstract util extends none of these 9. Abstract class can have constructors and static methods? true false Abstract class can have constructors but can not have static methods. Abstract class can not have constructors but can have static methods. 10. A method which is declared as abstract and does not have implementation is known as an _____________? Abstract Interface Abstract Thread Abstract List abstract Method 11. Why use of inheritance? for method overriding for code reusability Both a and b None of above 12. Which of these keyword must be used to inherit a class ? this super extends implementation 13. To create an Abstract class, the keyword “class” is also required. State TRUE or FALSE. True false 14. Can you create an object from an abstract class in Java? yes no 15. Which of these keywords is used to refer to member of base class from a sub class? upper supper this none mentioned 16. Which of these is correct way of inherit class A into class B ? class B+class A{} class B inherit class A{} class B extends class A{} class B extends A{} 17. A class member declared protected becomes a member of subclass of which type public member private member protected member static member 18. Which one advantage of Abstraction? Reduces complexity Avoid code duplication easy the burden of maintenance Increase Security and confidentiality 1,2,3 1,2 1,3,4 All (1,2,3 and 4) 19. Which is the opposite of an Abstract Class? interface concrete class Encapsulation hidden 20. An abstract class in Java usually contains one or more abstract ____. constructors methods variable none 21. Choose a correct statement about abstract classes? An abstract class can extend a concrete class An abstract class can extend another abstract class An abstract class can implement any number of interfaces. All the above. 22. An abstract class can define ____ inside of it. Inner abstract class Inner concrete class static methods All of the above 23. Which one type of inheritance are not allow in java ? Multiple Multilevel hierarchical single 24. chain of inheritance, it is known as: Hybrid Inheritance Multilevel Inheritance Multiple Inheritance None 25. When two or more classes inherits a single class, it is known as hierarchical inheritance. single Inheritance hybrid Inheritance Multilevel Inheritance 26. Multiple Inheritance , successfully run with : through extend Through interface Through extends through final 27. we can achieve hybrid inheritance only : Extend extends interface Interface 28. this statement , Any constructor are not inherited by subclass, false true not sure none 29. create object for any abstract class not sure allow not allow none 30. Can we define static method in an abstract class ? yes not confused none Loading …