CS506 Grand Quiz Solved with Reference Fall 2020 || VURANK

CS506 GRAND QUIZ SOLVED 100% VERIFIED BY ADMIN (MID TERM SYLLABUS)

Q1: Which of the following statement is a correct statement for "mouse release" event in "MouseListener" interface?
A) public void mouseRelease(MouseEvent me)
B) Public void mouseRelease(MouseEvent me)
C) public void mouseReleased(MouseEvent me) (page 114) (100% Sure)
D) Public void mouseReleased(MouseEvent me)

Q2: The classes which contain the word _______ in their names are byte oriented streams.
A) Reader
B) Writer
C) Stream (page71) (100% Sure)
D) Byte

Q3: Converting a bigger data type into smaller data type is called _______.
A) Up-casting
B) Down-casting (page44) (100% Sure)
C) Normal-casting
D) High-casting

Q4: What will happen if main method is declared as private?
A) The program will not compile
B) The program will throw an exception at run time. (Confirm) (100% Sure)
C) The program will compile and run successfully
D) None of the given options

Q5: _______ is required in order to get an object from collection.
A) Up-casting
B) Down-casting (page 203) (100% Sure)
C) Implicit casting
D) None of the given options



Q6: In given lines of code ________ is applying.
int a =20;
double b = a;
A) upcasting a to b type (page 43) (100% Sure)
B) upcasting b to a type
C) downcasting a to b type
D) downcasting b to a type

Q7: Which of the following features is avaliable in java?
A) Pointers
B) Operator Overloading
C) Global variable
D) primitive data types (page 22) (100% Sure)

Q8: If there is no exception in the try block then the catch block ________ executes.
A) Always
B) Sometimes
C) Never (page56) (100% Sure)
D) None of the given

Q9: Which of the following methods is used to determine whether a database is read only or not?
A) isReadonly()
B) isReadOnly() (page160) (100% Sure)
C) isreadonly()
D) IsReadOnly()

Q10: AWT is also called ______.
A) Heavy weight components (page 88) (100% Sure)
B) Light weight components
C) Both Light weight and Heavy weight components
D) Never Light not heavy weight



Q11: Which of the following method is used to execute INSERT, UPDATE and Delete SQL statements?
A) executeQuery(sql);
B) ExecuteQuery(sql);
C) executeUpdate(sql); (page 134) (100% Sure)
D) ExecuteUpdate(sql);

Q12: In polymorphism ________ are overridden.
A) Variables
B) Methods (page42) (100% Sure)
C) Data types
D) Classes

Q13: Which of the given Listener Interfaces is need to handle the "KeyEvent"?
A) MouseKeyListener
B) MotionKeyListener
C) KeyListener (page 105) (100% Sure)
D) KeyActionListener

Q14: Interface imposes __________ structure on any class that uses interface.
A) code
B) design (page 85) (100% Sure)
C) implementation
D) inheritance

Q15: Which of the following methods is called only once during the life cycle of an Applet?
A) start()
B) stop()
C) paint()
D) init() (page 184) (100% Sure)



Q16: Which of the given Listener interfaces have adapter class(s)?
A) ActionListener
B) MouseMotionListener (page119) (100% Sure)
C) AdjustmentListener
D) ItemListener

Q17: For a programmer the event handling is a three step process in terms of code. Which of the following is NOT an event handling step?
A) Generate event
B) Handle event
C) Publish event (page 104) (100% Sure)
D) Register handler with generator

Q18: In Java, _____ types of statement objects are avaliable for sending SQL queries to the databases.
A) Two
B) Three
C) Four (page 140) (100% Sure)
D) Five

Q19: setColor() is a method of _______ object.
A) JPanel
B) JFrame
C) Graphics (page 172) (100% Sure)
D) Image

Q20: Which of the following statement is true regarding paintChildren() method?
A) It tell the component to paint its border.
B) It first paints the background and then performs custom painting
C) It first perform custom painting and then paints the background
D) it tells any components contained by this component to paint themselves (page 170) (100% Sure)



Q21: A class that is defined in another class is called.
A) Private class
B) Public class
C) Inner class (page 121) (100% Sure)
D) Derived class

Q22: FTP (File Transmission Protocol) works on ____ port.
A) 21 (page183) (100% Sure)
B) 23
C) 80
D) 84

Q23: Which of the following statement is true about primitive data types and reference data types?
A) primitive data types are created on heap whereas references are created on stack.
B) Both primitive data types and references are reated on stack.
C) Primitive data types are created on stack whereas references are created on heap. (page 22) (100% Sure)
D) Both primitive data types and references are created on heap.

Q24: In java, overloading is ________ whereas overriding is ______.
A) Run time binding, compile time binding
B) Late binding, compile time binding
C) compile time binding, Run time binding (Confirm) (100% Sure)
D) Run time binding, Late time binding

Q25: DDL stands for?
A) Data Definition Language (page 137) (100% Sure)
B) Data Driven Language
C) Database Definition Language
D) Database Driven Language

Q26: Which of the following methods of an Applet is called every time when page is minimized?
A) start()
B) init()
C) stop() (page 185) (100% Sure)
D) destroy()

Q27: Suppose strings are stored in a collection "arraylist". Get one string element and store in element variable. Choose correct line of code for this requirement.
A) String element = String arraylist.get(i);
B) String element = (String) arraylist.get(i); (page 45) (100% Sure)
C) String element= element arraylist.get(i);
D) String element = (element) arraylist.get(i);

Q28: Exceptions must be handled while handling files otherwise it may lead to _____.
A) Logical error
B) Syntax error
C) Run-time error (page 60) (100% Sure)
D) No error

Q29: There are _______ steps in order to communicate successfully with database.
A) Six
B) Seven
C) Eight (page 132) (100% Sure)
D) Nine

Q30: When there is just a onetime use of a particular object of a java class, we use ________.
A) named object
B) anonymous object (page 127) (100% Sure)
C) either named object or anonymous object
D) neither named object or anonymous object

No comments:

Post a Comment