Ans. 2 How does Java application connect to a database? Name the technology only. Ans. 3 Expand ODBC and JDBC. Ans. 4 What is connection? Ans. 5 What does a Statement Object do? Ans. 6 What is result set? Ans. 7 What for a Class.forName () used? Ans. 8 Name two commonly used drivers used for database connectivity from Java applications. Ans. 9 Name methods to do the following: (i) Open connection (ii) Create statement (iii) Move cursor forward by one row in a result set (iv) Place cursor to first row in a result set (v) Place cursor to last row in a result set.
Ans. 10 Which methods are used to execute SQL queries? Ans. 11 Which package must be made part of Java application for database connectivity? Write statement to do so. Ans. 12 Write a statement to register driver com.mysql.jdbc.Driver with DriverManager. Ans. 13 Write a statement to open a connection object namely myCon for a MySQL database namely school. Ans. 14 Name the methods for the following:
(i) To fetch an integer value from a result set (ii) To fetch a float value from a result set (iii) To fetch a string value from a result set (iv) To fetch a date value from a result set (v) To fetch a boolean value from a result set (vi) To fetch a double value from a result set
Ans. 15 What is the difference between following two statements that use an object namely rs of ResultSet type? (i) rs.getString(1); (ii) rs.getString (Name);
Ans. MULTIPLE CHOICE QUESTIONS:
1. We may use ____________ to develop the Front-End of an application.
A. GUI B. Database C. Table D. None of the above
2. The ______________ method is used when we simply want to retrieve data from a table without modifying the contents of the table
A. execute() B. queryexecute() C. query() D. executeQuery()
3. Which of the following class libraries are essentially required for setting up a connection with the database and retrieve data?
A. DriverManager B. Connection C. Statement D. All of the above
4. The _____________ is required to establish connectivity between the Java code and the MySQL database. E. JDBC API F. JDBC Driver G. Both A and B
5. To execute SQL statements, you need to instantiate a _____________ object using the ______________ object.
A. Connection , Statement B. Statement, Connection C. JDBC Driver, Statement D. JDBC DriverManager, Statement
6. Which of the following statements are false? A. The getConnection() method is used to establish a connection. B. An application can have more than one connection with a database. C. An application cannot have more than one connection with a database. D. An application can have many connections with different databases. 7. The _______________ method is used to instantiate a statement object using the connection object
A. getConnection() B. getStatement() C. createConnection() D. createStatement()
8. The ____________ method is used to move to the next row of the result set. A. next() B. findNext() C. last() D. forward()
WEB APPLICATION DEVELOPMENT/HTML MULTIPLE CHOICE QUESTIONS
1. The address of a resource on the net is known as: (a) ISP (b) HTTP (c ) URL (d) WWW
2. A program that serves requested HTML files and pages. (a) Web Address (b) Web Page (c ) Web Server (d) None of these
3. HTML tags must be written within: (a) < > (b) { } (c) [ ] (d) ( )
4. Which of the following is the correct structure of HTML tags? (a) < HTML> </HTML> <HEAD> </HEAD> <BODY> </BODY> (b) <HTML> <HEAD> </HEAD> </HTML> <BODY> </BODY> (c) <HTML> <HEAD> <BODY> </BODY> </HEAD> </HTML> (d) <HTML> <HEAD> </HEAD> <BODY> </BODY> </HTML> 5. Which of the following tags is used to specify the items in a list. (a) <LI> (b) <OL> (c ) <UL> (d) <DL>
6. The IMAGE tag uses the _______ attribute to specify the URL of the image to be displayed. (a ) SCR (b) SRC (c ) Source (d) None of these
7. The align attribute of <Table> tag refers to _________ placement of the table in relation to the window screen. (a) Vertical (b) horizontal (c ) Both a and b (d) None of these
8. Choose the best suitable input type to input gender from the user: (a) Text (b) Submit (c) checkbox (d) Radio
9. Elements, such as heading, paragraph and tables etc can be contained in the FORM element. (a) Holds True always (b) Holds True Sometimes (c) Is Never True (d) None of these 10. Data entry on a web page can be done using: (a) Tables (b) Formatting Tags (c ) Forms (d) Lists
11. Which tag is used to embed an image in an HTML document. (a) <FIX> (b) <IMG> (c ) <IMAGE> (d) <FIX IMAGE> 12. To create a nested list we use the tag: (a) <OL> (b) <UL> (c ) <NL> (d) combination of (a) and (b) as required.
13. Input type="________" will send the form to its destination place. (a) Button (b) File (c) Submit (d) Reset
14. FACE is the attribute of which tag: (a) <BODY> (b) <FONT> (c ) <P> (d) <IMG>
15. Radio buttons can be grouped together so that only one is selected at a time by using the attribute: (a) name (b) selected (c ) checked (d) font
16. XML document is used to (a) Only interpret data (b) Store any kind of data (c) Store only highly structured data (like in databases) (d) Store only loosely structured data (like letters)
17. XML can be used to (a) Exchange data (b) Store data (c) Interpret data (d) All of these
18. Every XML document must begin with a (a) Root element (b) Child element (c) XML version details (d) Any of these WEB APPLICATION DEVELOPMENT
1 In the URL, http://www.mycorp.com/pr/master.htm, what is the http component? Ans.
2 In the URL, http://www.mycorp.com/pr/master.htm, what is the www.mycorp.com component? Ans.
3 In the URL, http://www.mycorp.com/pr/master.htm, what is the /pr/master.htm component? Ans.
4 How is a file communicated to another computer on Internet? Ans.
5 What is WWW? How does it function? Ans
6 What is a URL? What are its components? Example required. Ans.
HTML-I: BASIC HTML ELEMENT
7 HTML stands for _______________? Ans.
8 What do you understand by TAG? Ans
9 What is an attribute in HTML? Ans
10 HR tag is used for _____________? Ans.
11 <TITLE> tag is used to define ____________________. Ans.
12 What is the basic structure of HTML File? Ans.
13 Face attribute is used with _____________tag and used for _______. Ans
14 To align multiple lines of text we use ______ (a) Justify (b) DIV (c) Align (d) None of these Ans.
15 What is the use of size in <BASEFONT> tag? Ans.
16 List the attributes of <FONT> tag? Ans.
17 List and define different types of paragraph alignments. Ans. 18 State True or False. (a) <BR> tag has its closed tag as </BR> (b) <P> tag has no closing tag (c) <HR> tag is same as <BR> (d) <KBD> tag is used to display tables Ans.
19 The default alignment of text is ________, default text color is ________and the default background color is ____________. Ans.
20 Differentiate between <TITLE> and <HEAD> tags? Ans.
21 Differentiate between container and empty elements? Ans.
22 Differentiate between <BR> and <P> tags. Ans.
23 List and define different types of heading tags. Ans. 24 List and explain the different attributes of body tag? Ans.
25 What is the difference between basefont and font tag? Ans.
HTML-II: LISTS, TABLES AND FORMS
26 What type of lists are supported by HTML? Ans.
27 Which three tags let you create the definition lists? Ans.
28 What is the table? Which tag is used to create tables in HTML? Ans. A table is a collection of rows and column. <TABLE> tag is used to create tables in HTML.
29 How is spacing in cells of table controlled? Ans.
30 How can you specify following in a table? (i) Background image ii) Background colour. (ii) Table height vi) Table width. Ans.
31 Which tag is used to specify (i) Table data? Ii) Table header? iii) Table row? Ans 32 Name the attributes used for following? (i) Setting the cell width ii) Setting cells background image iii) Setting cells background colour vi ) Changing the cell span v) Aligning cell contents vertically. Ans.
33 Name different control types supported by HTML forms. Ans.
34 Write the tags to define the following: (i) A text box (ii) A text area (iii) A radio button (iv) A check box (v) A password box (vi) A pop up box (vii) Submit button (viii) A label. Ans.
35 Differentiate between ordered and unordered lists. Ans.
36 How would you indent a single word and put a square bullet in front of it? Ans.