Languages-Java [3i Infotech Placement]: Sample Questions 44 - 47 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 44

Edit

Describe in Detail

Essay▾

Which methods are used to destroy the objects created by the constructor methods?

Explanation

Finilize Method in Inheritance
  • Finalize () is used to destroy the objects created by the constructor methods.
  • Garbage Collector always calls this just before the deletion of object eligible for Garbage Collection, to perform clean-up activity.
  • Clean-up means closing Database Connection, Network Connection or resource de-allocation.

Declaration

protected void finalize ()

Question 45

Write in Short

Short Answer▾

Brace used in c for what

Explanation

  • Brace used in c for convention.
  • It is used to create a body.
  • The opening brace indicates the start of a segment with the closing brace indicating the end segment.
  • Many opening braces as closing braces.

Question 46

Edit

Describe in Detail

Essay▾

Which keyword is used to inherit a class?

Explanation

Understanding of Extend Inherit Class
  • Extends keyword is used to inherit a class.
  • It is overrides all the methods and variables in the parent class there reusability of code is achieved.

Syntax

class Super

{

}

class Sub extends Super

{

}

Question 47

Edit

Describe in Detail

Essay▾

Explain 2-tier and 3-tier architecture?

Explanation

2-tier architecture: client server application

Structure of 2-Tier Architecture

Two-tier architecture is divided into two parts:

Two-Tier Architecture
  • Client system handles presentation and application and server handles database.
  • Communication takes place between the client and server-Client requests the server and server processes the request and sends back the data to the client.

3-tier architecture:

Define 3-Tier Architectur

Three-tier architecture is divided into three parts:

Three-Tier Architecture

In this client system handles presentation, application server handles application layer and server system handles database layer.

Developed by: