1. Which of this access specifier is not used for a class members accessed different class in the same package? a. public b. protected e non modifier d. private 2. The following Syntax is used for? class Subclass-name extends Superclass-name { I/methods and variabies } a. Polymorphism b. Encapsulation c. Inheritance d. None of the above 3. Which is example of runtime polymorphism? a. Method overriding b. Method overloading Constructor overloading a. None of the above 4. If subclass has the same method as decdared in the super class, it is known as? a. Method overriding b. Method overloading c. Constructor overloading d. None of the above 5. Which type of polymorphism is the method overloading in java? a. Runtime polymorphism b. Compile time polymorphism c. Constructor overloading d. None of the above -- is a special method that har 6. A--

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
choose the correct answer in java
11. Given a class named student, which of the following is a valid constructor
1. Which of this access specifier is not used for a class members accessed by a
different class in the same package?
a. public
b. protected
c. non modifier
d. private
2. The following Syntax is used for?
class Subclass-name extends Superclass-name {
//methods and variabies }
a. Polymorphism
b. Encapsulation
. Inheritance
d. None of the above
3. Which is example of runtime polymorphism?
a. Method overriding
b. Method overloading
C. Constructor overloading
d. None of the above
4. If subclass has the same method as declared in the super class, it is known as?
a. Method overriding
b. Method overloading
c. Constructor overloading
d. None of the above
5. Which type of polymorphism is the method overloading in java?
a. Runtime polymorphism
b. Compile time polymorphism
c. Constructor overloading
d. None of the above
6 A - - is a special method that has the seme name as the class and it used to
initialize the instance variable of a class
na
a. constructor
b. setter
c. getter
d. static method
7. Advantage of inheritance in object oriented programming is/are Multiple
inheritance means,
a. more classes inheriting from one super class
b. one class inheriting from more super classes
c. more classes inheriting from more super classes
d. None of the above
8.
variable is shared by all instances of the class
a. static
b. abstract
c. final
d. None of the above
9. Which class members can be accessed from the classes in the same package and
classes in other Packages that are subclasses of the declaring class?
a. Private
b. Public
c. Protected
d. None of the above
10. If there are one or more constructors fos a dass then how many constructors
will be called when an object of that class is created?
a. All of the constructors
b. A first constructor will be called,
c. one of the constructors
d. None of the above
declaration for the class?
a. int student (){)
b. private final student ()( }
c. void student(){}
d. student () {)
Transcribed Image Text:11. Given a class named student, which of the following is a valid constructor 1. Which of this access specifier is not used for a class members accessed by a different class in the same package? a. public b. protected c. non modifier d. private 2. The following Syntax is used for? class Subclass-name extends Superclass-name { //methods and variabies } a. Polymorphism b. Encapsulation . Inheritance d. None of the above 3. Which is example of runtime polymorphism? a. Method overriding b. Method overloading C. Constructor overloading d. None of the above 4. If subclass has the same method as declared in the super class, it is known as? a. Method overriding b. Method overloading c. Constructor overloading d. None of the above 5. Which type of polymorphism is the method overloading in java? a. Runtime polymorphism b. Compile time polymorphism c. Constructor overloading d. None of the above 6 A - - is a special method that has the seme name as the class and it used to initialize the instance variable of a class na a. constructor b. setter c. getter d. static method 7. Advantage of inheritance in object oriented programming is/are Multiple inheritance means, a. more classes inheriting from one super class b. one class inheriting from more super classes c. more classes inheriting from more super classes d. None of the above 8. variable is shared by all instances of the class a. static b. abstract c. final d. None of the above 9. Which class members can be accessed from the classes in the same package and classes in other Packages that are subclasses of the declaring class? a. Private b. Public c. Protected d. None of the above 10. If there are one or more constructors fos a dass then how many constructors will be called when an object of that class is created? a. All of the constructors b. A first constructor will be called, c. one of the constructors d. None of the above declaration for the class? a. int student (){) b. private final student ()( } c. void student(){} d. student () {)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education