Thursday , 21 November 2024

CS506 unsolved MCQs Mega Collection for Mid Term Papers

VUAssignments.com upload a big collection of unsolved MCQs and Quizsfor the Mid Term Papers try to solved these Quizs and MCQs and try to solved these CS506 Quizs and MCQs yourself.

Question

Which of the following feature provide facility for multiple inheritance:-

  1. Adapter Classes
  2. Wrapper Classes
  3. Interface
  4. Collection

Question

The relationship between class and interface is called ________

  1. ‘Is a’ relationship
  2. ‘Has a’ relationship
  3. ‘Responds to’ relationship
  4. None of the given options

Question

Which of the following function will be used to register event handler with events generator (button)?

 

  1. addAction()
  2. addListener()
  3. addActionListener()
  4. Register eventhandeler()

Question

The collection API are defined in ______ package?

  1. Java.io
  2. Java.util
  3. Java.sql
  4. Java.awt

Question

Which of the following is true about abstract class?

  1. An abstract class must have all methods declared as abstract methods.
  2. A class must have at least one abstract method to be an abstract class.
  3. A class without any abstract method can be declared as abstract class.
  4. An instance of abstract class can be created. Imrangee

 

Question

Exceptions must be handled while handling files otherwise it may lead to____?

  1. Logical error
  2. Syntax error
  3. No error
  4. Run time error

Question

Which of the following stream is a filter stream?

  1. BufferedReader
  2. FileWriter
  3. FileReader
  4. All of given options

Question

CREATE, ALTER, DROP are _________ SQL statements.

  1. DML
  2. DDL
  3. DCL
  4. None of above

Question

Which of the following statement object is used to execute stored procedures?

  1. Statement
  2. PreparedStatement
  3. CallableStatement
  4. None of given options

Question

Based on functionality, the streams can be categorized as ________ Byte oriented streams and Node Streams

  1. Filter stream and Character oriented stream
  2. Node stream and Filter stream
  3. Byte oriented stream and Character oriented stream
  4. Which of the following syntax is used to attach an input stream to console?

Question

The relationship between class and interface is called ________ ‘Is a’ relationship

Question

Which of the following stream read/write data in the form of bytes?

  1. FileInputStream,

Question

Which of the following stream is a Node stream?

  1. PrintWriter
  2. BufferedReader
  3. FileWriter

If a class needs to handle events generated by button then which of the following interface a class needs to implement?

  1. ActionListener
  2. Top of Form

Question

Which of the following belongs to a category of checked exception?

Select correct option:

  1. Null Pointer exception
  2. IOException
  3. Array index out of bounds
  4. NumberFormatException

Question

Which of the following is called “pure abstract class”?

Select correct option:

  1. Concrete class
  2. Wrapper class
  3. Interface
  4. Abstract class with no abstract method

Question

An instance of abstract class cannot be created.

Select correct option:

  1. True
  2. False

Question

Which of the following is used for inheritance in java?

Select correct option:

  1. implements
  2. extends
  3. : (colon)
  4. inherit

Question

Which of the following package needs to import while interacting with relational database?

Select correct option:

  1. java.io
  2. java.sql
  3. javax.swing
  4. java.awt

Question

Window, frame and dialog use ________ as their default layout.

Select correct option:

  1. Border layout
  2. Flow layout
  3. GridBag layout
  4. Grid layout

Question

A collection can store _________

Select correct option:

  1. Homogenous objects
  2. Heterogeneous objects
  3. Objects as well as primitive values
  4. At most 100 objects

Question

Which of the following is a general purpose container?

Select correct option:

  1. JFrame
  2. Dialog
  3. JPanel
  4. JApplet

Question

Overloading is _______ whereas overriding is _____

Select correct option:

  1. Run time binding, compile time binding
  2. Late binding, compile time binding
  3. Compile time binding, run time binding
  4. Run time binding, late time binding

Question

The relationship between class and interface is called ________

Select correct option:

  1. ‘Is a’ relationship
  2. ‘Has a’ relationship
  3. ‘Responds to’ relationship
  4. None of the given options

Question

HahMap takes key as a/an _________

Select correct option:

  1. Object
  2. Array
  3. Primitive value
  4. Function

Question

Which of the following statement object is used to execute stored procedures?

Select correct option:

  1. Statement
  2. PreparedStatement
  3. CallableStatement
  4. None of given options

Question

Mouse events can be trapped for ________ GUI component.

Select correct option:

  1. JPanel
  2. JFrame
  3. JButton
  4. All of given

Question

Which of the following stream read/write data in the form of bytes?

Select correct option:

  1. FileReader
  2. FileWriter
  3. PrintWriter
  4. FileInputStream

Question

Which of the following method is used to execute INSERT, UPDATE and Delete SQL statements?

Select correct option:

  1. executeQuery(sql);
  2. ExecuteQuery(sql);
  3. executeUpdate(sql);
  4. ExecuteUpdate(sql);

Question

Which of the following is true about abstract class?

Select correct option:

  1. An abstract class must have all methods declared as abstract methods.
  2. A class must have at least one abstract method to be an abstract class.
  3. A class without any abstract method can be declared as abstract class.
  4. An instance of abstract class can be created.

Question

DSN stands for _________

Select correct option:

  1. Data System Name
  2. Domain system Name
  3. Data Source Name
  4. Database System Name

Question

CREATE, ALTER, DROP are _________ SQL statements.

Select correct option:

  1. DML
  2. DDL
  3. DCL
  4. None of given

Question

Which of the following belongs to a category of checked exception?

Select correct option:

  1. Null Pointer exception
  2. IOException
  3. Array index out of bounds
  4. NumberFormatException

Question

Which of the following belongs to a category of checked exception?

Select correct option:

  1. Null Pointer exception
  2. IOException
  3. Array index out of bounds
  4. NumberFormatException

Question

Which of the following function is declared in MouseMotionListener interface?

Select correct option:

  1. public void mousePressed (MouseEvent me);
  2. public void mouseDragged (MouseEvent me);
  3. public void mouseClicked (MouseEvent me);
  4. public void mouseEntered (MouseEvent me);

Question

Which of the following is true about abstract class?

Select correct option:

  1. An abstract class must have all methods declared as abstract methods.
  2. A class must have at least one abstract method to be an abstract class.
  3. A class without any abstract method can be declared as abstract class.
  4. An instance of abstract class can be created.

Question

Mouse events can be trapped for ________ GUI component.

  1. JPanel
  2. JFrame
  3. JButton
  4. All of given

Question

Which of the following is true about AWT and SWING components?

  1. AWT components creates a process whereas SWING component creates a thread.
  2. AWT components creates a thread whereas SWING component creates a process.
  3. Both AWT and SWING component creates a process.
  4. Both AWT and SWING component creates a thread.

Question

WindowListener interface contains _______ methods.

  1. Four
  2. Six
  3. Seven
  4. Eight

Question

If a class needs to handle events generated by button then which of the following interface a class needs to implement?

  1. ComponentListener
  2. KeyListener
  3. MouseListener
  4. ActionListener

Question

Window, frame and dialog use ________ as their default layout.

  1. Border layout
  2. Flow layout
  3. GridBag layout
  4. Grid layout

Question

Which of the following method is used to execute SELECT SQL statements?

  1. executeUpdate(sql);
  2. ExecuteUpdate(sql);
  3. executeQuery(sql);
  4. ExecuteQuery(sql);

Question

Which of the following stream is a filter stream?

  1. FileWriter
  2. FileReader
  3. BufferedReader
  4. All of given options

Question

Which of the following stream read/write data in the form of bytes?

  1. FileReader
  2. FileWriter
  3. PrintWriter
  4. FileInputStream

Question

If a super class method is protected then overriding method _________

  1. must be protected
  2. must be public
  3. must be private
  4. may be either protected or public

Question

Which of the following belongs to a category of checked exception?
Select correct option:

  1. Null Pointer exception
  2. IOException
  3. Array index out of bounds
  4. NumberFormatException

Question

Which of the following is called “pure abstract class”?
Select correct option:

  1. Concrete class
  2. Wrapper class
  3. Interf ace
  4. Abstract class w ith no abstract method

Question

An instance of abstract class cannot be created.
Select correct option:

  1. True
  2. False

Question

Which of the following is used for inheritance in java?
Select correct option:

  1. implements
  2. extends
  3. : (colon)
  4. inherit

Question

Which of the following package needs to import while interacting with relational database?
Select correct option:

  1. java.io
  2. java.sql
  3. javax.sw ing
  4. java.aw t

Question

Window, frame and dialog use ________ as their default layout.
Select correct option:

  1. Border layout
  2. Flow layout
  3. GridBag layout
  4. Grid layout

Question

A collection can store _________
Select correct option:

  1. Homogenous objects
  2. Heterogeneous objects
  3. Objects as w ell as primitive values
  4. At most 100 objects

Question

Which of the following is a general purpose container?
Select correct option:

  1. JFrame
  2. Dialog
  3. JPanel
  4. JApplet

Question

Overloading is _______ whereas overriding is _____
Select correct option:

  1. Run time binding, compile time binding
  2. Late binding, compile time binding
  3. Compile time binding, run time binding
  4. Run time binding, late time binding

Question

The relationship between class and interface is called ________
Select correct option:

  1. ‘Is a’ relationship
  2. ‘Has a’ relationship
  3. ‘Responds to’ relationship
  4. None of the given options

Question

HahMap takes key as a/an _________
Select correct option:

  1. Object
  2. Array
  3. Primitive value
  4. Function

Question

Which of the following statement object is used to execute stored procedures?
Select correct option:

  1. Statement
  2. PreparedStatement
  3. CallableStatement
  4. None of given options

Click here to Save Answ er & Move to Next Question

Question

Mouse events can be trapped for ________ GUI component.
Select correct option:

  1. JPanel
  2. JFrame
  3. JButton
  4. All of given

Question

Which of the following stream read/write data in the form of bytes?
Select correct option:

  1. FileReader
  2. FileWriter
  3. PrintWriter
  4. FileInputStream

Question

Which of the following method is used to execute INSERT, UPDATE and Delete SQL statements?
Select correct option:

  1. executeQuery(sql);
  2. ExecuteQuery(sql);
  3. executeUpdate(sql);
  4. ExecuteUpdate(sql);

Question



Which of the following is true about abstract class?
Select correct option:

  1. An abstract class must have all methods declared as abstract methods.
  2. A class must have at least one abstract method to be an abstract class.
  3. A class w ithout any abstract method can be declare abstract class.
  4. An instance of abstract class can be created.

Question

DSN stands for _________
Select correct option:

  1. Data System Name
  2. Domain system Name
  3. Data Source Name
  4. Database System Name

Question

CREATE, ALTER, DROP are _________ SQL statements.
Select correct option:

  1. DML
  2. DDL
  3. DCL
  4. None of given

Question

Which of the following belongs to a category of checked exception?
Select correct option:

  1. Null Pointer exception
  2. IOException
  3. Array index out of bounds
  4. NumberFormatException

Question

Which of the following belongs to a category of checked exception?
Select correct option:

  1. Null Pointer exception
  2. IOException
  3. Array index out of bounds
  4. NumberFormatException

Question

Which of the following function is declared in MouseMotionListener interface?
Select correct option:

  1. public void mousePressed (MouseEvent me);
  2. public void mouseDragged (MouseEvent me);
  3. public void mouseClicked (MouseEvent me);
  4. public void mouseEntered (MouseEvent me);

Question

Which of the following is true about AWT and SWING components?
Select correct option:

  1. AWT components creates a process w hereas SWIN component creates a thread.
  2. AWT components creates a thread w hereas SWING component creates a process.
  3. Both AWT and SWING component creates a process
  4. Both AWT and SWING component creates a thread.

Question

WindowListener interface contains _______ methods.
Select correct option:

  1. Four
  2. Six
  3. Seven
  4. Eight

Question

If a class needs to handle events generated by button then which of the following interface a class needs to implement?
Select correct option:

  1. ComponentListener
  2. KeyListener
  3. MouseListener
  4. ActionListener

Question

Window, frame and dialog use ________ as their default layout.
Select correct option:

  1. Border layout
  2. Flow layout
  3. GridBag layout
  4. Grid layout

Question

Which of the following stream is a filter stream?
Select correct option:

  1. FileWriter
  2. FileReader
  3. Buf feredReader
  4. All of given options

Question

Which of the following stream read/write data in the form of bytes?
Select correct option:

  1. FileReader
  2. FileWriter
  3. PrintWriter
  4. FileInputStream

Question

If a super class method is protected then overriding method _________
Select correct option:

  1. must be protected
  2. must be public
  3. must be private
  4. may be either protected or public

Click here to Save Answ er & Move to Next Question

Check Also

CS506 Unsolved Paper for Final Term Try to solve

Question No: 1 ( Marks: 1 ) – Please choose one Which of the following …

Leave a Reply

Your email address will not be published. Required fields are marked *

*