Java Programming Questions & Answers: part17



Software Programming : Java Programming QUESTIONS AND ANSWERS :: part17 : 1 to 5

Following Software Programming language Entrance Multiple choice objective type questions and answers will help you in Software Programming 2024 examinations :

1.Which of the following is valid to open a database connection?

Connection con = DriverManager.getConnection(url, userid, password);
Connection con = DriverManager.getConnection();
Connection con = new DriverManager.getConnection();
Connection con = DriverManager.openConnection(url);
Connection con = new DriverManager.openConnection();.

2.Which of the following is the default Layout Manager for an Applet?

FlowLayout
BorderLayout
GridLayout
CardLayout
MarginLayout.

3.Select from among the following what Java can do?

Object oriented applications can be developed
Networking applications can be developed
Database applications can be developed
Either (opt1) or (opt2) above
Either (opt1) or (opt2) or (opt3) above.

4.Which exception is thrown by the getConnection() method of the DriverManager class?

ConnectionNotFoundException
IOException
SQLException
ReadException
DataExecption.

5.Single-line comments that should be ignored by the compiler are denoted using

Two forward slashes ( // )
A slash and a star ( /* )
System.out.println
System.out.print
One forward slash.

More Java Programming QUESTIONS AND ANSWERS available in next pages

    Health is the greatest gift, contentment is the greatest wealth -Buddha
Trust because you are willing to accept the risk, not because it’s safe or certain