Model Question Paper of Advance Java

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Dr.

Shyama Prasad Mukherjee University, Ranchi


PG Department of Mathematics & M.Sc.IT

Model Question Paper


M.Sc.IT, SEMESTER-III
Advance Java Programming (CCMIT302)

Group-A
Multiple Choice Questions (Compulsory)

1. Which is the container that doesn't contain title bar and MenuBars but it can
have other components like Button, TextField etc?
a) Window
b) Frame
c) Panel
d) Container
2. Which method is used to set the graphics current colour to the specified
colour in the graphics class?
a) public abstract void setFont(Font font)
b) public abstract void setColor(Color c)
c) public abstract void drawString(String str, int x, int y)
d) None of the above
3. The __________ package contains classes that help in connecting to a
database, sending SQL statements to the database and process the query
request.
a) connection.sql
b) db.sql
c) pkg.sql
d) Java.sql
4. The Java Foundation Classes (JFC) is a set of GUI components which simplify
the development of desktop applications.
a) TRUE
b) FALSE
5. Which object can be constructed to show any number of choices in the visible
window?
a) Labels
b) Choice
c) List
d) CheckBox
6. Which method can set or change the text in a Label?
a) setText()
b) getText()
c) All the above
d) None of the above
7. Which is a component in AWT that can contain another components like
Buttons, TextFields, Labels etc.?
a) Window
b) Container
c) Panel
d) Frame
8. Find the correct syntax of the declaration which defines the XML Version?
a) <?xml version=1.0 ?>
b) <xml version=1.0/>
c) <?xml version=1.0/>
d) None of the above
9. What is purpose of next( ) method?
a) to retain the next element in a series.
b) to retain next table.
c) to retain next record in a series.
d) None of the above
10. The ActionListener interface is not used for handling action events.
a) TRUE
b) FALSE
11. Which package provides many event classes and Listener interfaces for event
handling?
a) java.awt
b) java.awt.Graphics
c) java.awt.event
d) None of the above
12. Swing is not a part of JFC (Java Foundation Classes) that is used to create
GUI application.
a) TRUE
b) FALSE
13. Which language is Extensible Markup Language (XML) similar?
a) HTML
b) JavaScript
c) PHP
d) ASP
14. Which of these events is generated when a button is pressed?
a) WindowEvent
b) ActionEvent
c) WindowEvent
d) KeyEvent
15. Which are the main features of XML?
a) Text data description
b) Human – computer – friendly format
c) Handles data in a tree structure having one – and only one – root element

d) All mentioned above


16. _______ is a table of data which represents a data from table.
a) MetaData
b) ResultSetMetaData
c) ResultSet
d) Statement
17. EJB is a ______ software element that summarizes business logic of an
application.
a) Client-side
b) Server-side
c) Application
d) Desktop
18. By which method you can set or change the text in a Label?
a) setText()
b) getText()
c) Both A & B
d) None of the above
19. Which object can be constructed to show any number of choices in the visible
window?
a) Labels
b) Choice
c) List
d) Checkbox
20. In XML Document Comments are given as?
a) <!-- --!>
b) <!-- ?>
c) </-- -->
d) <?-- ?>
Group-B
Short Answer Type Questions

1. Explain the difference between AWT and Swing


2. Explain any three Containers in Swing.
3. What is JLabel class? Explain with example of any three constructors and
methods of JLabel class.
4. Write a program when click on button then display a suitable message in the
text field.
5. What is JPanel class? Explain the constructors of JPanel class and give a
suitable example.
6. What is JCheckBox class? Explain the constructors of JCheckBox class and
give a suitable example.
7. Explain the JDBC-ODBC bridge driver and thin driver.
8. Explain the difference between HTML and XML.
9. What is XML attributes? Explain the rules for XML attributes
10. Explain the difference between static and dynamic website.
11. Explain the difference between GET and POST requests.
12. What is Technology of Web? Explain any two web technologies.

Group-C
Long Answer Type Questions

1. What is JFrame class? Explain constructors and methods of JFrame class. Write
a suitable program with using Jframe class, constructor and methods.
2. What is text controls? Explain JTextField, JTextArea and JPasswordField class
with constructors and methods.
3. Explain the different steps to connect a Java Application to Database. Write a
suitable program to connect Java application to Database.
4. What is XML? Explain the features, advantages and syntaxes of XML.
5. What is Servlet? Explain the different features of Servlet.
*******

You might also like