|CS506 Web Design and Development MCQS OBJECTIVE QUESTIONS|
1. JDBC-ODBC stands for ___
- Java Database Connectivity-Oracle Database Connectivity
- Java Database Corporation-Open Database Corporation
- Java Database Corporation-Oracle Database Corporation
- Java Database Connectivity-Open Database Connectivity ✔
2. Which of the following operator is used to concatenate strings?
- + ✔
3. Which of the following feature does java provide?
- Operator Overloading
- Overriding ✔
- Multiple Inheritance
4. The following is an example of :
BufferedReader br = new BufferedReader(fr);
- Byte-Oriented Stream
- Node Stream
- Filter Stream ✔
- File Stream
5. Which of the following method is used to convert a string into an int value?
- parseInteger() ✔
6. If there is no exception in the try block then the catch block ___ executes.
- Never ✔
7. Java Program code is compiled into a form called ___
- Machine code
- Byte code ✔
- Native code
- Source code
8. Which of the following feature is not included in java?
- Pointer manipulation ✔
- Data encapsulation
9. Which one of the following understands the byte code?
- Operating System
- Java Compiler
- Java Virtual Machine ✔
- Java Interpreter
10. Adapter classes have been defined for listener interfaces except ___ interface.
- ActionListener ✔
11. == operator compares ___ of strings whereas equals( ) method compares ___ of strings
- Values, addresses
- Addresses, values
- Size, addresses
- Addresses, size
12. Event handling is a ___ step process
13. Window, frame, and dialog use ___ as their default layout.
- Border Layout
- Flow layout
- GridBag layout
- Grid layout
14. Which of the following belongs to a category of checked exception?
- Null Pointer exception
- Array index out of bounds
15. All the exceptions and errors in java are inherited from ___ class.
16. If a superclass method is protected then the overriding method ___
- must be protected
- must be public
- must be private
- may be either protected or public
17. Which of the following syntax attaches an output stream to console?
- FileWriter fw = new FileWriter(“output.txt”);
- FileWriter fw = new FileWriter(FileDescriptor.out);
- FileWriter fw = new FileWriter(FileDescriptor.in);
- FileWriter fw = new FileWriter(FileDescriptor);
18. Which of the following command is used to compile Java code?
- java filename
- java filename.java
- javac filename
- javac filename.java
19. AWT is a GUI package used in java, AWT stands for ___
- Apache Window Toolkit
- Application Windowing Tools
- Application Windows Template
- Abstract Windowing Toolkit
20. Java defines ___ for the listener interfaces having more than one event handling methods.
- Wrapper classes
- Abstract classes
- Concrete classes
- Adapter classes
21. Mouse events can be trapped for ___ GUI component.
- All of the given
22. Which of the following statement object is used to execute stored procedures?
23. Which of the following statement object is used to execute precompiled SQL statements?
- None of the given
24. Which of the following method is used to determine whether a database is read-only or not?
25. ___components generate events.
- Only AWT
- Only Swing
- All AWT and Swing
- Not all AWT and Swing
26. Which of the following function will be used to register an event handler with events generator, where the event generator is a button?
27. Which of the following syntax is used to get DataBaseMetaData object?
- DataBaseMetaData md = rs.getMetaData(); //where rs is ResultSet object
- DatabaseMetaData md = st.getMetaData(); //where st is Statement object
- DataBaseMetaData md = con.getMetaData(); //where con is Connection object
- DataBaseMetaData md = rsmd.getMetaData(); //where rsmd is ResultSetMetaData object
28. Which of the given Listener interface(s) have adopter class(s)?
29. There are ___steps in order to communicate successfully with database
30. An event in java is represented as ___
- Primitive data type
31. Which of the given statement objects are used to execute using same query multiple times by only changing parameters?
- Both b and c
32. Which of the following function is declared in MouseMotionListener interface?
- public void mousePressed(MouseEvent me);
- public void mouseDragged(MouseEvent me);
- public void mouseClicked(MouseEvent me);
- public void mouseEntered(MouseEvent me);
33. DSN stands for ___
- Data System Name
- Domain system Name
- Data Source Name
- Database System Name
34. Which of the following is a DDL statement?