Adj Imp Que
Adj Imp Que
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
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.
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.
Module 2
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.
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.
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
Q4. A concise overview of the JDBC (Java Database Connectivity) process with example
programs
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.