SUPERSTARWEBTECH

There is no elevator to success. You have to take the stairs. Take your first steps with SSWT!

CS506 Web Design & Development Quiz MCQs Lecture 1-22 MidTerm Objective Questions

CS506-Web Design & Development Quiz MCQS #Objective #Questions #Midterm

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
  • Pointers
  • 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?

  • intValue()
  • parseInt()
  • ParseInt()
  • parseInteger() ✔

6. If there is no exception in the try block then the catch block ___ executes.

  • Always
  • Somtime
  • Never ✔
  • None

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?

  • Inheritance
  • Polymorphism
  • 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.

  • MouseListener
  • KeyListener
  • WindowListener
  • 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

  • One
  • Two
  • Three
  • Four

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
  • IOException
  • Array index out of bounds
  • NumberFormatException

15. All the exceptions and errors in java are inherited from ___ class.

  • Exception
  • Error
  • Throwable
  • IOException

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.

  • JPanel
  • JFrame
  • JButton
  • All of the given

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

  • Statement
  • PreparedStatement
  • CallableStatement
  • None

23. Which of the following statement object is used to execute precompiled SQL statements?

  • Statement
  • PreparedStatement
  • CallableStatement
  • None of the given

24. Which of the following method is used to determine whether a database is read-only or not?

  • isReadonly()
  • isReadOnly()
  • isreadonly()
  • IsReadOnly()

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?

  • addAction()
  • addActionListener()
  • addListener()
  • registerListener()

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)?

  • ActionListener
  • AdjustmentListener
  • MouseMotionListener
  • ItemListener

29. There are ___steps in order to communicate successfully with database

  • six
  • seven
  • eight
  • nine

30. An event in java is represented as ___

  • Operator
  • Function
  • Object
  • Primitive data type

31. Which of the given statement objects are used to execute using same query multiple times by only changing parameters?

  • Statement
  • CallableStatement
  • PreparedStatement
  • 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?

  • Select
  • Delete
  • Create
  • Update

Author

Anam Afzal

Anam Afzal

Hi, I'm a Pakistani freelancer with a passion for helping businesses achieve their online goals through no-code solutions. I specialize in WordPress customization and ManyChat automation, and I'm always on the lookout for new ways to use technology to make businesses more efficient and successful. I'm also a big believer in the power of no-code tools to democratize technology and make it accessible to everyone. I'm passionate about sharing my knowledge and helping others learn how to use no-code tools to create their own websites, automate their workflows, and grow their businesses. If you're looking for a reliable and experienced no-code developer, I'm here to help. Please feel free to contact me to discuss your project requirements.
SHARE THIS POST