0% found this document useful (0 votes)
1 views5 pages

Adj Imp Que

The document contains a list of tentative questions for an end-semester exam covering various topics in Java, including the Collection Framework, String manipulation, Swing components, Servlets, and JDBC. Each module consists of multiple questions focusing on concepts, syntax, and programming tasks related to Java. The document emphasizes the importance of these questions for students' preparation but clarifies that they do not guarantee higher scores.

Uploaded by

4al22cs128
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)
1 views5 pages

Adj Imp Que

The document contains a list of tentative questions for an end-semester exam covering various topics in Java, including the Collection Framework, String manipulation, Swing components, Servlets, and JDBC. Each module consists of multiple questions focusing on concepts, syntax, and programming tasks related to Java. The document emphasizes the importance of these questions for students' preparation but clarifies that they do not guarantee higher scores.

Uploaded by

4al22cs128
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/ 5

Tentative Questions of ADJ for End sem Exam

Module 1

Q1.Elucidate List, Set and Map interfaces in Collection Framework in java with its types,
methods and properties
Q2. Explain Key Characteristics of ArrayList, LinkedList, Hashset, Hashmap, Treeset
Collection interfaces in java with its syntax and methods for adding elements into them.
Q3. Explain the Syntax of HashMap interface with basic operation of adding 3 elements into it,
accessing elements, updating value, not updating if key already exist , removing element and
conditional remove
Q4. Explain the Syntax of HashSet interface with basic operation of adding 4 ( including one
dulplicate) elements , Checking size and empty status, Checking element existence, Removing
elements
Q5. Implement a multi-level sorting program for a collection of Student objects with fields name,
grade, age, and enrollmentId. The program should demonstrate the use of the Comparator
interface to:
1. Sort students by grade in descending order
2. If grades are equal, sort by name in ascending order
3. If names are also equal, sort by age in ascending order

Q6. Explain List,set,Queue and Map

Q7. A program that demonstrates concurrent modification exception in Collection of ArrayList


having elements from 1 to 10 while trying to delete all odd numbers during iteration of foreach
loop. Explain how it can be solved through coding.

Q8. Write program to get all the following string elements into a LinkedList called Ls and extract
the sub elements from 1 to 3 and print them on console.["Orange","geen","pink","red","Blue"]

Q9. Write program to get the numbers from 1 to 10 through bulk addition method into a
ArrayList called Al and remove all the odd numbers one by one and display the removed
numbers on the console and print all the remaining elements on the console finally

Q10. Differentiate Iterator and for-each loop with their advantages, key limitations of for-each
and Special features of Iterator along with their usuages

Q11. Write a program using the interface LinkedHashMap from Java collections to add the
following elements into the object called invensions and print the following o/p using foreach.
(“Electric Bulb” , “Edison”), (“Steam Engine”,”Jonh watts”),(“Aeroplane”, “Right brothers”),
(“Radio” , “Marconi”)
o/p : Electric Bulb was developed by Edison, Steam Engine was developed by Jonh watts,
Areoplane was developed by Right brothers, Radio was developed by Markcony

Q12. Write a program using the interface HashMap from Java collections to add the following
elements into the object called Map and print the o/p using foreach
(2,"Strawberry"), (4,"Cucumber"), (5,"Grapes"), (1,"Apple"), (3,"Pear"), (2,"Strawberry")
Q13. Define a class called Employee with fields name, salary, depart with constructor for getting
values as follows through parameters from main class.
("Alice", 20000, "IT"), ("Bob", 25000, "CS"), ("Charlie", 23000, "IT"), ("David", 30000,
"CS"),
("Larance", 40000, "IT")
Define comparators and print the set of objects as 1. byName (Ascending) 2. bySalaryDec 3.
bySalaryAsc 4.byDepartAndbySalaryDec, 5.byDepartAndbySalaryAsc.

Q14. Define ArrayList in Java Collections with syntax . Explain the following methods with
Java example programs
1) binarySearch() (from [1,2,3,4,5] , finds the element 3 )
2) copy() ( source= [ "Apple","Banana","Cherry"], copy into another ArrayList called
destination )
3) equals() ( L1=[1,2,3], L2=[1,2,3], L3=[3,2,1] , compares L1 with L2 and L1 with L3)
4) fill() ( L1=["One", "Two", "Three", "Four"], fill with “Default” )

Q15. Define Queue interface in Java Collections with Syntax and Explain the important methods
in Queue Interface with examples.

Q16. Explain TreeMap and HashMap with example programs


Q17. Compare Comparable and Comparator interfaces in Java each with example program

Q18. Elucidate the concept of Random Access Interface and Sequential Access Interface with a
suitable example program for making Performance comparison between random and sequential
access

Q19. Elucidate Legacy classes and interfaces with a suitable example program.

Q20. What is a Collection Framework? Explain the methods defined by


Collections Framework.

Module 2

Q1. Explain StringBuffer methods 1) Insert() 2) append() 3) replace 4) substring() 5) capacity 6)


reverse() 7) CharAt() 8) delteCharAt() with a Java program

Q2. Explain between equals() and == with respect to string comparison.


Q3. Write a Java program that demonstrates any six constructors of String class
Q4. List and explain the Eight String comparison methods in Java.
1. equals(),2. equalsIgnoreCase(),3. compareTo(), 4. compareToIgnoreCase(), 5. startsWith(), 6.
endsWith(),
7. regionMatches(), 8. contains()

Q5. Write a program to remove duplicate characters from a given String and display the String.
Q6. Explain split() in java with an example program
Q7. Explain join() in Java with an example program
Q8. Data Conversion Using valueOf( ) in java to handle various data types with an example
program
Q9. Illustrate Real time Application of Data Conversion Using valueOf( ) in Java with an
example program developed for banking account creation application with the class
BankAccount and the fields accountHolderName( String), accountNumber(int), balance
(double), gender( boolean – true for male and false for female). Get the inputs through keyboard
and print all the bank Information on the console

Q10. Define the applications ( where it can be used) of String, StringBuilder and StringBuffer
classes in Java. Write an example for illustrating each concept. Eluciate each of them with the
metric of immutability, performance, thread safety, efficiency and usage context

Module 3

Q1. Explain the key features of Swing with a sample program for displaying the message
“Welcome to Swing ” through a label when the button “Click Me” is pressed.

Q2. Write a program to create a frame for a simple arithmetic calculator using swing
components and layout mangers.

Q3. Develop a simple swing program for illustrating mouse operations such as mouse down, up
double click , single click with help of a button

Q4. Develop a swing program for showing two image icons of hour glass and clock and when the
icon is pressed , the respective message like hour glass is pressed or clock is pressed should be
displayed on the console.

Q5. Elucidate Components and Containers in Swing with neat sketches

Q6. Develop a Swing program for displaying JList which contains names of countries . If the
country is selected from JList by clicking the country by mouse , it should display the name of the
country in the display

Q7 . Develop a login form for getting user name and password using swing program

Q8. Develop a tabbedpane for displaying red, green and blue colors in the pane by selecting the
respective tab.

Q9. Develop an animated program using swing for displaying ball bouncing within a frame.

Q10 Develop a swing program to display table with data

Q11 . Develop a Swing program to find factorial of a number by getting a number through text
field and display the result by pressing Compute button

Q12. Develop a swing program to get a string through text field and convert it into upper case,
lower case , reverse and find the length of the string.

Q13 Develop Swing program to get a number and check whether it is Palindrome Number or not
Q14. Develop a swing program to switch on or off the light panel by changing color (gray when
off, yellow when on) using ToggleButton

Q 15. Develop a swing program to display checkboxes with the prices of pizza topping .
Calculate the total amount of the pizza topping when the check boxes are checked.

Q16 . Develop a swing program by selecting the pizzas by its sizes with radio buttons and display
the total of the all selected items by pressing Compute button

Module 4

Q1. Creation of servlet using three ways through Eclipse with step by step procedure
1. running a servlet without any html
2. running a servlet with html
3. running a servlet with JSP

Q2. Develop a Servlet with JSP for performing arithmetic operations of two numbers using
HTML tags
Q3. Explain the Life Cycle of Servlets with a neat diagram.
Q4. What is cookie? How cookie is handled in JSP? Write a JSP program to create and read a
cookie with life time of 60 seconds.
Q5. Explain different JSP tags with a program to demonstrate all tags.
Q6. List and explain the core classes and interfaces in javax.servlet package.
Q7. Explain Servlets with neat diagrams and the difference between servlet and CGI
Q8. Session Management Implementation using an example program

Module 5

Q1. What are the types of statement object in JDBC? Explain the following statement objects
with example programs
Types of Statement:
1) Statement, 2) PreparedStatement 3) CallableStatement

Q2.Explain the four types of JDBC drivers with neat sketches

Q3.Write any two syntax of establishing a connection to the database.


Using DataSource and Using DriverManager

Q4. A concise overview of the JDBC (Java Database Connectivity) process with example
programs

Q5 Explain Meta data in JDBC with an example program

Q6. Explain transaction processing in JDBC.


Q7 Why Should We Use JDBC?

Q8. Explain the JDBC packages

Q9. Basic Components of JDBC with an example program


1. JDBC Driver: Software that allows Java applications to interact with databases
2. Connection: Represents the connection to a specific database
3. Statement: Used to execute SQL queries
4. ResultSet: Contains data retrieved from the database

Disclaimer

The tentatives questions are given for the purpose of understanding how the
questions are asked in end semester. It is given out of experience and expertise of
the faculty. Therefore,the students are asked to refer to these questions before
studying all other questions. It is not guaranteed for scoring more marks or pass
marks.

All the Best!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy