KEMBAR78
Java Slips Questions | PDF | Java (Programming Language) | User (Computing)
0% found this document useful (0 votes)
32 views5 pages

Java Slips Questions

The document outlines a series of programming assignments in Java, JSP, and Servlets, covering various topics such as multithreading, JDBC, and socket programming. Each slip contains tasks that require writing code to perform specific functions, such as displaying client IP addresses, managing user sessions, and manipulating data in databases. The assignments are designed to enhance understanding of advanced Java concepts and practical application in web development.

Uploaded by

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

Java Slips Questions

The document outlines a series of programming assignments in Java, JSP, and Servlets, covering various topics such as multithreading, JDBC, and socket programming. Each slip contains tasks that require writing code to perform specific functions, such as displaying client IP addresses, managing user sessions, and manipulating data in databases. The assignments are designed to enhance understanding of advanced Java concepts and practical application in web development.

Uploaded by

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

JAVA SLIPS

Slip1

A) Write a java program to display IP Address and Name of client machine [10 M]

B) Write a JSP script to accept username, store it into the session, compare it with password in
another jsp file, if username matches with password then display appropriate message in html file.

Slip2

Q.1. Advanced Java: A) Write a multithreading program in java to display all the vowels from a given
String.[10M]

B) Write a SERVLET program which counts how many times a user has visited a web page. If user is
visiting the page for the first time, display a welcome message. If the user is revisiting the page,
display the number of times visited. (Use cookies)

Slip3

A) Write a JDBC program to display the details of employees (eno, ename, department, sal) whose
department is “Computer Science”. [10 M]

B) Write a java program to accept ‘n’ integers from the user & store them in an ArrayList collection.
Display the elements of ArrayList collection in reverse order. [15M]

Slip4

A) Write a java program to display “Hello Java” message n times on the screen. (Use Runnable
Interface). [10 M]

B) Write a SERVLET program that provides information about a HTTP request from a client, such as IP
address and browser type. The servlet also provides information about the server on which the
servlet is running, such as the operating system type, and the names of currently loaded servlets.

Slip5

A) Write a java program to create Teacher table(TNo.TName, Sal, Desg) and insert a record in it.[10M]

B) Construct a Linked List containing name: CPP, Java, Python and PHP. Then extend your java
program to do the following:

1. Display the contents of the List using an Iterator.

2. Display the contents of the List in reverse order using a ListIterator. [15 M] .

Slip6

A) Write a java program to accept the details of customer (CID, CName, Address, Ph_No) and store it
into the database(Use PreparedStatement interface) [10 M]

B) Write a socket program in java to check whether given file is present on server or not

Slip7

A) Write a JSP program to calculate sum of first and last digit of a given number. Display sum in Red
Color with font size 18. [10 M]
B) Write a JAVA program to create two threads, one displays "computer science" and another
displays "information science" five times.

Slip8

A) Write a multithreading program using Runnable interface to blink Text on the frame. [10 M]

B) Write a SERVLET application to accept username and password, search them into database, if
found then display appropriate message on the browser otherwise display error message. [15 M]

Slip9

Q.1. Advanced Java: A) Write a JDBC program to delete the records of employees whose names are
starts with ‘A’ character. [10 M]

B) Define a thread called PrintText_Thread for printing text on command prompt for n number of
times. Create three threads and run them. Pass the text and n as parameters to the thread
constructor. Example: i. ii. iii. First thread print (I am in FY)10 times Second thread print (I am in SY)20
times Third thread print (I am in TY)30 times)

Slip10

A) Write a JDBC program to count the number of records in table. (Without using standard method).
[10 M]

B) Accept’n’ integer from the user and store them in a collection. Display them in the sorted order.
The collection should not accept duplicate elements (Use suitable collection).

Slip11

A) Write a JDBC program to remove “percentage” column from student (rno, sname, percentage)
table. Student table is already created.

B) Write a Java program to display sales details of Product (PID, PName, Qty, Rate,Amount) (Assume
Sales table is already created).

Slip12

A) Write a java program to display the number’s between 1 to 100 continuously in a TextFiel by
clicking on button. [10 M]

B) Write a JSP program to accept the details of Account (ANo, Type, Bal) and store it into database
and display it in tabular form. (Use PreparedStatement interface) [15 M]

Slip13

A) Write a java program to create a Mobile (Model_No, Company_Name, Price, Color) table. [10
M]
B) B) Write a Socket program in java for simple stand-alone chatting application. [15M]

Slip14

A) Write a Socket program in java which displays the server machine’s date and time on the client
machine.

B) Consider the following Entities and Relationships Department (dept_no, dept_name, location)
Employee (emp_no, emp_name, address, salary, designation) Relation between Department and
Employee is One to Many Constraint: Primary key, salary should be > 0. Find total salary of all
computer department employees.

Slip15

A) Write a java program to display each alphabet after 2 seconds between ‘a’ to ‘z’. [10M]

B) Write a SERVLET program in java to accept details of student (SeatNo, Stud_Name, Class,
Total_Marks). Calculate percentage & grade obtained and display details on page.

Slip16

A) Write a JSP script to accept username and password from user, if they are same then display
“Login Successfully” message in Login.html file, otherwise display “Login Failed” Message in
Error.html file. [10 M]

B) Write a JSP page, which accepts user name in a text box and greets the user according to the time
on server machine.

Slip17

A)Write a java program which will display name and priority of current thread. Change name of
Thread to MyThread and set the priority to 2 and display it on screen. [10 M]

B) Write a JDBC application using swing for the following: Type DDL Query ,Create Table , Alter Table,
Drop Table[15 M]

Slip18

A) Write a java program to calculate factorial of a number. (Use sleep () method). [10 M]

B) Write a java program using multithreading to execute the threads sequentially. (Use Synchronized
keyword).

Slip19

Q.1. Advanced Java: A) Create a JSP page to accept a number from an user and display it in words:
Example: 123 – One Two Three. The output should be in red color.

B) Construct a Linked List containing name: CPP, Java, Python and PHP. Then extend your java
program to do the following: 1. Display the contents of the List using an Iterator. [10 M] 2. Display the
contents of the List in reverse order using a ListIterator. [15 M]

Slip20

A) Write a JSP program to display the details of Hospital (HNo, HName, Address) in tabular form on
browser. [10 M]

B) Write a Socket program in java for chatting application.

Slip21

Q.1. Advanced Java: A) Write a JDBC Program in java to display the names of Employees starting with
‘ S’character. [10 M]

B) Write a SERVLET program in java to accept details of student (SeatNo, Stud_Name, Class,
Total_Marks). Calculate percentage and grade obtained and display details on page.
Slip22

A) Write a socket program in java in which client accept a number, send it to the server,server

calculates its factorial and sends result to the client. [10 M]

B) Write a java program to create a student table with field’s rno, name and per. Insert values

in the table. Display all the details of the student on screen. (Use PreparedStatement interface)

Slip23

A) Write a JSP script to accept the details of Student (RNo, SName, Gender, Comp_Know , Class) and
display it on the browser. Use appropriate controls for accepting data. [10M]

B) Write a SERVLET application to accept username and password, if found correct then display
appropriate message on the browser otherwise display error message. [15 M]

Slip24

A) Write a JSP script to check whether given mail ID is valid or not. (Mail ID should contain one @
symbol) [10 M]

B) Write a java program to accept the details of college (CID, CName, Address, year) and store it into
database (Use Swing and PreparedStatement interface) [15 M]

Slip25

A) Write a Java program to accept a number through client terminal, send it to the Server, Server
calculates its factors and sends it to the client. [10 M]

B) Write a java program for implementation scrollable ResultSet. Consider Emp table (eno ename,
sal) -moveFirst -moveNext -movePrevious -moveLast

Slip26

A) Write a multithreading program in java to display the alphabets from A to Z after 3 seconds [10M]
B) Write a JSP program to check given number is perfect number or not. [15 M]

Slip27

A) Write a JSP script to accept the details of Teacher (TID, TName, Desg, Subject, Qualification) and
display it on the browser. Use appropriate controls for accepting data. [10 M]

B) Write a Java Program for the implementation of scrollable ResultSet. Assume Teacher table with
attributes (TID, TName, Salary, Subject) is already created.

Slip28

A) Write a JSP program to check whether given number is Armstrong or not. (Use Include directive).
B) Create table Furniture(furniture id,furniture name,price,type).Insert 5 records in the database and
display furniture of price greater than 2000.(use PreparedStatement).[15 M]

Slip29

A) Write a JSP program to accept Name and Age of Voter and check whether he is eligible for voting
or not.
B) Write a menu driven java program for the following: Insert,Update,Delete,Search,Display,Exit.
Consider Student (rno, sname, per) table for this.

Slip30

A) Write a JSP program to display all the odd number’s between 1 to n in “Blue”Color. [10 M]

B) Write a servlet program to display the details of Product (ProdCode, PName, Price) on the browser
in tabular format. (Use database).

You might also like