Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MCQ (20 pts): Write the letter A, B, C, or D in your answer sheet to indicate your correct answer. 1. Encapsulation provides A) inheritance

image text in transcribed
image text in transcribed
MCQ (20 pts): Write the letter A, B, C, or D in your answer sheet to indicate your correct answer. 1. Encapsulation provides A) inheritance B) information hiding C) polymorphism D) none of the above 2. In Java, a class can contain several constructors A) Yes B) No 3. How many instances of class C create the following code? cx,u,v; x= new c(); cy=x; cz= new c(); A) None B) Five C) Three D) Two 4. If there is at least one constructor with parameters and no constructor without parameters then the default constructor is always accessible? A) Yes B) No 5. A class variable that is common to all instances of the class must be declared A) private B) static C) final D) protected 6. In Java, a class can inherit from several parent classes at the same time? A) Yes, since version 1.4 B) Yes, since version 5.0 C) No, unlike C++ D) Yes 7. Which statement is correct about interfaces in Java? A) The interface is used to achieve multiple inheritance in Java B) The object of an interface cannot be created C) An interface can inherit another interface D) All these statements are true 8. An object of which class is used to compile regular expressions? A) Pattern class B) Matcher class C) PatternSyntaxException D) None of the above 9. We cannot create instances of a ? A) Anonymous class B) Nested class C) Parent class D) Abstract class 10. We cannot inherit from a ? A) Abstract class B) Final class C) Subclass D) Inner class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

6. Effectively perform the managers role in career management.

Answered: 1 week ago