3i Infotech Papers: Sample Questions 868 - 871 of 1245

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 868

» Languages » Java

Short Answer Question▾

Write in Short

Can an abstract class may be final?

Explanation

  • No, abstract class may not be declared as final.

  • A final class is considered complete and cannot be sub classed.

  • Abstract classes require the implementation to provide definition to abstract methods in the subclasses.

  • Thus, a final class cannot have abstract methods and an abstract class cannot be declared final.

Question number: 869

» Languages » Java

Short Answer Question▾

Write in Short

In an “. htm” form I have a button that makes us to open another page in 15 seconds. How will you do that?

Explanation

  • On the on-click of the button create a thread and make it sleep for 5 second.

  • Then the action (jsp) file will be called.

Question number: 870

» Basic CS » Data Structures

MCQ▾

Question

Which Statement would you use to remove the EMPLOYEE_Id_PK PRIMARY KEY constraint and all depending constraints from the employee table?

Choices

Choice (4) Response

a.

ALTER TABLE employee DROP PRIMARY KEY employee_id_pk CASCADE

b.

MODIFY TABLE employee DROP CONSTRAINT employee_id_pk CASCADE

c.

ALTER TABLE employee DELETE PRIMARY KEY CASCADE

d.

ALTER TABLE employee DROP PRIMARY KEY CASCADE

Answer

d.

Explanation

ALTER TABLE employee DROP PRIMARY KEY CASCADE removes the EMPLOYEE _ID_PKPRIMARY KEY constraint and all depending constraints from the EMPLOYEE table.

Question number: 871

» Languages » Java

Essay Question▾

Describe in Detail

What are swing component?

Explanation

Diagram of swing component

Diagram of Swing Component

Diagram of swing component

  • A component is an independent visual control.

  • Swing Framework contains a large set of components allowing large customization.

  • They are all objects derived from Component class.

  • All components are lightweight components.

  • Below functions of component classes are widely used:

    • public void add (component c)

      Add a component on another component.

    • Public void setSize (int width, int height)

      Sets size of the component.

    • Public void setLayout (layout manager m)

      Sets the layout manager for the component.

    • Public void setVisible (boolean b):

      • Sets the visibility of the component.

      • It is default false.