Languages-Java [3i Infotech Placement]: Sample Questions 56 - 58 of 141

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 56

Edit

Write in Short

Short Answer▾

When can subclasses not access superclass members?

Explanation

Understanding of Super Class and Sub Class
  • When superclass is declared as private then subclasses cannot access superclass members.
  • The subclass can directly access the public members of the superclass.
  • Subclass can override the public members of the superclass.

Question 57

Edit

Write in Short

Short Answer▾

How can you know about drivers and database information?

Explanation

  • Java API contains the class DriverManager and the interface Driver in java. sql package.
  • This class provides information about the drivers and database to connect.

Question 58

Edit

Describe in Detail

Essay▾

Why do we use oops concepts? What are its advantages?

Explanation

Parts of OOP in Image
  • OOPs Stands for object oriented programing using concepts of classes and objects.
  • OOP example is c ++ and java.

Advantages:

  • Provides modular structure useful for defining abstract datatypes.
  • Encapsulation hides implementation details and provides classes a clearly defined interface.
  • Makes it easy to maintain and modify existing code inside the classes as long as interface remains unchanged.
  • Provides framework for libraries supplied components to adapt and modify.
  • Particularly useful for developing graphical user interfaces.

Developed by: