Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

For More Visit VUStudents.

pk

CS506 Solved Grand Quiz 2020


Question No 1
Which of the following method is used to execute INSERT, UPDATE and DELETE SQL
statements?
Select Correct Option
✓ executreQuery(sql);
✓ ExecuteQuery(sql);
✓ executeUpdate(sql); …………………(For More Visit VUStudents.pk)
✓ ExecuteUpdate(sql);

Question No 2
HashMap takes key as a/an ___________
Select Correct Option
✓ Object…………………(For More Visit VUStudents.pk)
✓ Array
✓ Primitive value
✓ Function

Question No 3
ArrayList is an example of ___________ collection type.
Select Correct Option
✓ Sequence Based…………………(For More Visit VUStudents.pk)
✓ Set based
✓ Hashmap based
✓ None of the given

Question No 4
If we want to animate something like ball, moving from one place to another, we constantly need
to call paint () method.
Select Correct Option
✓ True
✓ False…………………(For More Visit VUStudents.pk)

For More Visit VUStudents.pk


For More Visit VUStudents.pk
Question No 5
Which of the following is a general purpose container?
Select Correct Option
✓ JFrame
✓ Dialog
✓ JPanel…………………(For More Visit VUStudents.pk)
✓ JApplet

Question No 6
ResultSet provides various gathers to retrieve ________________.
Select Correct Option
✓ Data of the column…………………(For More Visit VUStudents.pk)
✓ Data of the row
✓ Data of the row and column
✓ Column headers

Question No 7
In editor java programs are created while stored on/in ________________.
Select Correct Option
✓ Disk…………………(For More Visit VUStudents.pk)
✓ Primary memory
✓ External file
✓ Usb

Question No 8
If a class needs to handle event generated by button then which of the following interface a class
needs to implement?
Select Correct Option
✓ CoponentListener
✓ KeyListener
✓ MouseListener
✓ ActionListener…………………(For More Visit VUStudents.pk)

For More Visit VUStudents.pk


For More Visit VUStudents.pk
Question No 9
Which of the following classes provide definitions for all the methods (empty bodies) of their
corresponding Listener interface?
Select Correct Option
✓ Private classes
✓ Public classes
✓ Adapter classes…………………(For More Visit VUStudents.pk)
✓ Inner classes

Question No 10
Which of the following is called “pure abstract class”?
Select Correct Option
✓ Concrete class
✓ Wrapper class
✓ Interface…………………(For More Visit VUStudents.pk)
✓ Abreact class with no abstract method

Question No 11
A default ResultSet object has a cursor that __________________-.
Select Correct Option
✓ Moves backward only
✓ Moves forward only…………………(For More Visit VUStudents.pk)
✓ Moves backward and forward
✓ Cannot move

Question No 12
Which of the given will clear all the previous painting?
Select Correct Option
✓ super.paintComponent()…………………(For More Visit VUStudents.pk)
✓ super.paint
✓ super.repaint()
✓ super.redraw()

For More Visit VUStudents.pk


For More Visit VUStudents.pk
Question No 13
Which of the following is NOT a method of ResultSet object?
Select Correct Option
✓ next()
✓ absolute(int)
✓ executeQuery(sql) …………………(For More Visit VUStudents.pk)
✓ updateRow()

Question No 14
Java defines _________ for the listener interfaces having more than one event handling methods.
Select Correct Option
✓ Wrapper classes
✓ Abstract classes
✓ Concrete classes
✓ Adapter classes…………………(For More Visit VUStudents.pk)

Question No 15
Which of the following feature is not included in Java?
Select Correct Option
✓ Inheritance
✓ Polymorphism
✓ Pointer manipulation…………………(For More Visit VUStudents.pk)
✓ Data encapsulation

Question No 16
Which of the following is a correct registration method for Focus Listener interface?
Select Correct Option
✓ addFocusListener…………………(For More Visit VUStudents.pk)
✓ addFousedListener
✓ regFoucListener
✓ regFousedListener

For More Visit VUStudents.pk


For More Visit VUStudents.pk
Question No 17
All AWT and swing component generate events.
Select Correct Option
✓ True…………………(For More Visit VUStudents.pk)
✓ False

Question No 18
___________________ is/are not part of jaca code language.
Select Correct Option
✓ ArrayList class…………………(For More Visit VUStudents.pk)
✓ Variables
✓ Arrays
✓ Objects

Question No 19
The collection API are defined in ___________ package.
Select Correct Option
✓ java.io
✓ java.util…………………(For More Visit VUStudents.pk)
✓ java.awt
✓ java.sql

Question No 20
Which of the following statement object is used to execute precompiled SQL statements?
Select Correct Option
✓ Statement
✓ PreparedStatement…………………(For More Visit VUStudents.pk)
✓ CallableStatement
✓ None of given

For More Visit VUStudents.pk


For More Visit VUStudents.pk
Question No 21
The _____________ is directly connected with keyboard
Select Correct Option
✓ File stream
✓ Character oriented stream
✓ Node stream…………………(For More Visit VUStudents.pk)
✓ Filter stream

Question No 22
Java does not handle execution by ___________ as keyword.
Select Correct Option
✓ Try
✓ Catch
✓ Execution…………………(For More Visit VUStudents.pk)
✓ Finally

Question No 23
Which of the following method is used to determine whether a database is read only or not?
Select Correct Option
✓ isReadonly()
✓ isReadOnly()…………………(For More Visit VUStudents.pk)
✓ isreadonly()
✓ IsReadOnly()

Question No 24
HTTP works on port _______________-.
Select Correct Option
✓ 21
✓ 23
✓ 80…………………(For More Visit VUStudents.pk)
✓ 84

For More Visit VUStudents.pk


For More Visit VUStudents.pk
Question No 25
DDL stands for?
Select Correct Option
✓ Data Definition Language…………………(For More Visit VUStudents.pk)
✓ Data Driven Language
✓ Database Definition Language
✓ Database Driven Language

Question No 26
Which of the following statement object is used to execute stored procedures?
Select Correct Option
✓ Statement
✓ PreparedStatement
✓ CallableStatement…………………(For More Visit VUStudents.pk)
✓ None of given options

Question No 27
Which of the following package needs to be import while handling files>
Select Correct Option
✓ java.util
✓ java.io…………………(For More Visit VUStudents.pk)
✓ java.awt
✓ javax.swing

Question No 28
Socket is a _________ communication channel between hosts.
Select Correct Option
✓ uni-directional
✓ bi-directional…………………(For More Visit VUStudents.pk)
✓ tri-directional
✓ multi-directional

For More Visit VUStudents.pk


For More Visit VUStudents.pk
Question No 29
In Java, ______________ types of statement objects are available for sending SQL queries to the
databases.
Select Correct Option
✓ Two
✓ Three…………………(For More Visit VUStudents.pk)
✓ Four
✓ Five

Question No 30
A port is a ______________ to which processes can listen for connections request.
Select Correct Option
✓ Local Address
✓ Server Address
✓ Client Address…………………(For More Visit VUStudents.pk)
✓ Transport Address

THE END
For More Visit VUStudents.pk

You might also like