KEMBAR78
Java QB | PDF | Method (Computer Programming) | Class (Computer Programming)
0% found this document useful (0 votes)
16 views7 pages

Java QB

The document outlines a comprehensive curriculum for Java programming, covering topics such as Java basics, inheritance, packages, interfaces, exception handling, multithreading, file handling, applets, and event handling. It includes various short answer, long answer, and problem-solving questions aimed at assessing understanding and application of Java concepts. Each unit is structured to facilitate learning through theoretical explanations and practical programming tasks.

Uploaded by

Aryan Gamer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views7 pages

Java QB

The document outlines a comprehensive curriculum for Java programming, covering topics such as Java basics, inheritance, packages, interfaces, exception handling, multithreading, file handling, applets, and event handling. It includes various short answer, long answer, and problem-solving questions aimed at assessing understanding and application of Java concepts. Each unit is structured to facilitate learning through theoretical explanations and practical programming tasks.

Uploaded by

Aryan Gamer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

UNIT-I

JAVA PROGRAMMING
Java Basics and Inheritance: The Genesis of Java, Overview of Java, Data Types, Variables, and Arrays,
Operators, Control Statements, Introducing Classes, Methods and Classes,Type Casting, String Handling, Abstract
Class,Method overriding.
Inheritance: Basics, Using Super, Creating a Multilevel Hierarchy, Problem with Multiple Inheritance.
Part - A (Short Answer Questions)
S QUESTIO Blooms Course Outcomes
No NS Taxonomy Level

1. What is the difference between structured Remember CO1


programming and object-oriented programming?
2. What do you mean by paradigm. what is the use of Remember CO1
it?
3. Define a class and object? Remember CO1
4. What is data abstraction? Explain about it? Remember CO1
5. What is inheritance? Explain the types of Remember CO1
inheritance?
6. What is encapsulation? Explain about it? Understand CO1
7. What are the benefits of inheritance? Understand CO1
8. What is polymorphism? Explain about dynamic Understand CO1
polymorphism?
9. Explain about inheritance concept? Understand CO1
Part - B (Long Answer Questions)
1. Explain about Procedural oriented and object Remember CO1
oriented programming paradigms?
2. Explain indetail about class and object with the help Remember CO1
of example?
3. What is meant by encapsulation? Explain how Remember CO1
encapsulation is achieved in JAVA.
4. Explain encapsulation, inheritance, polymorphism and Remember CO1
data types?
5. Explain various control structures Remember CO1
6. Why is java more secured than other languages. Remember CO1

7. Explain different abstraction mechanisms possible in Remember CO1


object oriented programming.
8. Distinguish the following terms. Remember CO1
(a) Inheritance and Polymorphism.
(b) Dynamic binding and message passing.
9. Describe the structure of a typical Java Program. Understand CO1
Enumerate the rule for creating identifiers in Java
10. Explain type conversion and casting? Understand CO1

11 Explain constructors and constructor overloading. Understand CO1

12 Explain the following ones with example. Understand CO1


a) Usage of static with data and methods.

b) Final keyword with data, access controls.


c) This keyword.
13 Explain all scope and life time variables, arrays, Understand CO1
operators and control statements in Java?
14 a) What is an array? Why arrays are easier to use Understand CO1
compared to a bunch of related variables?
15 What does tostring() method returns? How is it handled Understand CO1
in Java? Explain with an example.
16 How does String class differ from the String Buffer Understand CO1
class?
17 Explain about final classes, final methods and final Understand CO1
variables?
18 Explain the various forms of inheritance Understand CO1
19 Explain the concept of inheritance with an example? Understand CO1
also Explain the usage of super keyword with example?
20 What is the mechanism by which a call to an overridden Understand CO1
method is resolved at runtime? Explain with an example.
21 What is Multiple Inheritance? Explain how it can be Understand CO1
implemented in Java with the help of an example.
22 Discuss the following string operations: Understand CO1
(a) String Literals
(b) String concatenation
(c) String conversion
(d) String constructors
Part - C (Problem Solving and Critical Thinking Questions)
1. Write a while loop to find the smallest n such that n2 is Apply CO1, CO2
greater than 10,000.
2. Write a program to convert the given temperature in Apply CO1, CO2
Fahrenheit to Celsius using the following
conversion formula C = (F - 32)/1.8 And display the
values in a tabular form.
3. Explain the following methods of StringBuffer class and Apply CO1, CO2
write a Java Program illustrating Length(), Capacity(),
SetLenght(), EnsureCapacity().
4. How do classes help us to organize our programs? Apply CO1, CO2
Compare and contrast overloading and overriding
methods.
5. Write a program to illustrate the usage of the following Apply CO1, CO2
methods of StringBuffer class. Explain the
output in each case. Delete(), SetChatAt(),
deleteChatAt(), append(), chatAt(), getChars().
6. Write a program to demonstrate the concept of class Apply CO1, CO2
scope and method scope. Explain the lifetime of a variable
UNIT-II
Packages, Interfaces and Exception Handling: Packages- Packages, Access Protection,
Importing Packages,
Interfaces- Definition and Implementations,
Exception Handling- Types, Try and Catch, Throw and Finally statements.
Part - A (Short Answer Questions)
1 Define package Remember CO2
.
2 How to create and access a package Remember CO2
.
3 Depending on access control how the methods in Remember CO2
. the package can be accessed.
4 Explain about CLASSPATH Remember CO2
.
5 Explain about importing the packages Remember CO2
.
6. Explain the differences between classes and Remember CO2
interface
7. What is an interface Explain with an example Remember CO2
8. Explain how to implement interface Remember CO2
9. Explain about applying interfaces Understand CO2
10. Explain how to declare variables in interfaces Understand CO2
11. Explain how to extend interfaces Understand CO2
12. What is exception handling and explain types of Understand CO2
exceptions
13. What are benefits of Handling exceptions in Understand CO2
programming
14. Explain about exception hierarchy Understand CO2
15. Write a program using try and catch Understand CO2
16. Write a program using throw, throws and finally Understand CO2
key words
Part – B (Long Answer Questions)
1. Give illustrations on explicit interface member Understand CO1,CO2
implementations.
2. How Interfaces can be validated? Explain with example. Understand CO1,CO2

3. Write the difference between classes and interfaces? Understand CO1,CO2


4. Explain how multiple inheritances is implemented by Understand CO1,CO2
using interfaces with example?
5. Write short notes on the following: Understand CO1,CO2
a) Inheritance
b) Static class variables
c) Package
d) Constructors
Write a sample program to illustrate packages. Understand CO1,CO2
6.
7. What is an interface? What is the major differences and Understand CO1,CO2
similarities between an interface and class?
8. Explain with suitable examples about the usage of Understand CO1,CO2
try and catch statements.
9. What are the Java's built-in exceptions? List the checked Understand CO1,CO2
exceptions defined in the Java.lang and
explain them clearly with suitable examples.
10. What are Checked Exceptions and Unchecked Understand CO1,CO2
Exceptions? Explain some of these exceptions with an
example and also give the differences between them.
11. What is the difference between throw and throws Understand CO1,CO2
statement.
18.What are advantages of using Exception handling Understand CO1,CO2
mechanism in a program?
Part – C (Problem Solving and Critical Thinking)
1. Write an interface called shape with necessary methods. Apply CO1, CO2
Derive classes circle, rectangle, triangle,
cone, sphere and cube with appropriate constructors and
methods for area, volume also setting &
displaying.
2. Explain the following exceptions with the help of Apply CO1,CO2
examples:
(a) Arithmetic Exception
(b) Null Pointer Exception
3. Create a try block that is likely to generate three types of Apply CO1, CO2
exceptions and then incorporate necessary catch blocks to
catch and handle them appropriately.
4. Write a program that illustrates the application of Apply CO1, CO2
multiple catch statements. Write a program that
demonstrates how certain exception types are not allowed
to be thrown.
UNIT-III
Multi Threading and File Handling: Multithreaded Programming, Thread Life Cycle Creating
Threads, Creating Multiple Threads, Thread Priorities, Synchronization, Inter Thread
Communication, Suspending, Resuming and Stopping Threads.
File Handling: I/O Basics, Reading Console Input, Writing Console output, I/ O Classes and Interfaces
Part – A (Short Answer Questions)
1. Write notes on multi threading Remember CO1, CO2
2. Write notes on multi Tasking Remember CO1, CO2
3.. Explain about thread life cycle and draw the Remember CO1, CO2
diagram
4. Write the difference between process and thread Remember CO1, CO2
5. Explain about byte stream, character streams, Remember CO1, CO2
6. Explain console class, serialization Remember CO1, CO2
7. What are the benefits of stream. Remember CO1, CO2

8. Discuss about Print Stream. Remember CO1, CO2


Part – B (Long Answer Questions)
1. Explain FileInputStream and FileOutputStream with an Remember CO1, CO2
example for each.
2. Explain Buffered Reader and Buffered Writer classes Remember CO1, CO2
from IO package with an example-
3. Explain about Stream I/O. Understand CO1, CO2

4. Discuss how I/O operations are performed in java with Remember CO1, CO2
suitable examples.
5. Discuss about the methods available in the Character Remember CO1, CO2
Streams.
6. How to create multiple threads using thread class Understand CO1, CO2

7. Write notes on Understand CO1, CO2


a) Synchronization
b) Thread Priorities
c) Inter thread communication
8. Explain about thread priorities with an example Remember CO1, CO2
program.
9. Discuss about wait( ), notify( ) and notifyAll( ) methods Understand CO1, CO2
in Java.
1 What are the thread Synchronized methods in Java? Understand CO1, CO2
0. Explain their usage
1 Explain the concept of multithreading. Understand CO1, CO2
1. b) Differentiate process and thread.
c) Explain Thread life cycle.
1 How do you set and get priority values for threads in Java Understand CO1, CO2
2.
1 What is Stream? Explain about the inputstream and Understand CO1, CO2
3. outputstream?
What is the difference between System.out and Understand CO1, CO2
system.err?
Part – C (Problem Solving and Critical Thinking)
1. Write a Java Program to create a file with Student Apply CO1, CO2
information such as name, roll no and six subject
marks using File Write class.
2. Write a program explain the use of File Reader. Apply CO1, CO2
3. Implementing Runnable interface and extending thread, Apply CO1, CO2
which method you prefer for multithreading and why?
4. How do we set priorities for threads? Apply CO1, CO2

. UNIT-IV
Applets, Event Handling and AWT: Applet Basics, Applet Architecture, Applet Display Methods, Passing
parameters to Applets,
Event Handling: Delegation Event Model, Event Classes, Event Listener Interfaces,
AWT: Working with Windows, Graphics, Colors and Fonts, Using AWT Controls, Layout Managers and
Menus.
Part - A (Short Answer Questions)
1. What is an event? Explain event classes Understand CO1, CO3, CO4
2. Write notes on Remember CO1, CO3, CO4
a) event sources
b) event classes
c) event listeners
3. Write the difference between event sources , event Understand CO1, CO3, CO4
classes, event listeners
4. Draw the AWT hieararchy. Remember CO1, CO3, CO4
5. what is container, panel, window Understand CO1, CO3, CO4
6. Describe following states of applet life cycle : Understand CO1, CO3, CO4
a) Initialization state b) Running state.
c) Display state.

Part - B (Long Answer Questions)


1. What is meant by AWT? What are the AWT classes Remember CO1, CO3, CO4
contained in the Java.awt package? Discuss each of
them brief.
2. Explain in detail about the following event classes: Remember CO1, CO3, CO4
a) Component Event b) Container Event c) Focus
Event
3. Describe the ActionEvent , the AdjustmentEvent, Understand CO1, CO3, CO4
the ComponentEvent and the ContainerEvent classes
along with their methods and constructors
4. Briefly explain the following terms: (a) Understand CO1, CO3, CO4
Component. (b) Container. (c) Panel. (d) Window.
5. What is event source? Give examples of event Understand CO1, CO3, CO4
sources. How events are generated. Are all events
generated by user actions? Comment on it.
6. Write a Java Program which creates human face. Understand CO1, CO3, CO4

7. Explain the steps in creating a subclass of frame Understand CO1, CO3, CO4
with the help of examples.
8. What is Delegation Event model? Explain it. What Understand CO1, CO3, CO4
are its benefits?
9. What are the methods supported by the following Understand CO1, CO3, CO4
interfaces. Explain each of them (a)ActionListener
interface (b)MouseMotionListener interface (c)
TextListener interface.
10. Create an applet and explain life cycle of an applet? Apply CO3

11. Write the difference between applets and applications Apply CO3
and mention the types of applets?
12. What are the advantages of Layout managers? Why Understand CO3
Java prefers Layout managers instead of fixing the
component by x & y Coordinates? What are the
different Layout managers AWT supports?
13. Explain the following layout managers. (a) Border Understand CO3
layout. (b) Grid layout. (c) Flow layout
Part – C (Problem Solving and Critical Thinking)
1. Write a java program to create an apple with six Apply CO1, CO3, CO4
buttons representing your favorite six colors. When
button is clicked, the background must change to the
corresponding color.
2. . Write a program to enter two numbers(say a and Apply CO1, CO3, CO4
b) and an option. If the option is: 1:display the result
(a+b) 2: display the result (a-b) 3: display the result
(a*b)
3. Draw the inheritance hierarchy for the frame and Apply CO1, CO3, CO4
component classes in AWT
4. Write a java program to develop Login Window
using AWT

13.Question Bank (Module-Wise)

UNIT-V
JDBC, RMI And Servlets: JDBC-JDBC Architecture, The Structured Query Language, JDBC Configuration,
Executing SQL, RMI Architecture, A simple client/server application using RMI, Servlets- Life cycle of a Servlet,
Servlet packages ,Handling HTTP Requests and Responses.

Part - A (Short Answer Questions)


1. What does JDBC stand for? Understand CO1, CO4
2. Explain the JDBC-JDBC architecture. Understand CO1, CO4
3. What is the purpose of JDBC in Java applications? Understand CO1, CO4
4. How do you configure JDBC in a Java project? Understand CO1, CO4
5. What are the steps involved in executing SQL Understand CO1, CO4
queries using JDBC?
6. What is SQL? Understand CO1, CO4
7. What are the main categories of SQL commands? Understand CO1, CO4
8. What is RMI? Understand CO1, CO4
9. Describe the RMI architecture. Understand CO1, CO4
1 What is a servlet? Understand CO1, CO4
0.
1 What are the different servlet packages available in Understand CO1, CO4
1. Java?
Part - B (Long Answer Questions)
1. Demonstrate about (i) Database programming using Understand CO1, CO4
JDBC. b) Specific database actions.
2. Discuss about retrieving data from JDBC Database Understand CO1, CO4
Connectivity
3. Demonstrate about javax.sql package in detail. Understand CO1, CO4

4. What are the steps to connect to the database in java? Understand CO1, CO4

5. What are the JDBC API components? Understand CO1, CO4

6. What are the JDBC statements? Understand CO1, CO4

7. What is the return type of Class.forName() method? Understand CO1, CO4

8 What are the differences between Statement and Understand CO1, CO4
PreparedStatement interface?
9. How can we set null value in JDBC PreparedStatement? Apply CO1, CO4

10. What are the differences between execute, Understand CO1, CO4
executeQuery, and executeUpdate?
What are the different types of ResultSet? Understand CO1, CO4

Define Servlet. Explain the basic servlet structure Understand CO1, CO4
and its life cycle methods.
Part – C (Problem Solving and Critical Thinking)
1. Write a servlet application to establish Apply CO1, CO4, CO5
communication between html and servlet page using
hyperlink to wish Good Morning or afternoon or
evening or night based on the time.
2. List and explain the different HTTP 1.1 request Apply CO1, CO4, CO5
headers and its methods
3. Write a Servlet application to count the total Apply CO1, CO4, CO5
number of visits on your website.
4. Write a Java program to display the employee id, age, Apply CO1, CO4, CO5
first name and last name using JDBC connectivity.
HOD, CSE

You might also like