0% found this document useful (0 votes)
5 views

Practical questions1

The document outlines practical programming exercises across five units focusing on Java, web design, scripting, enterprise Java beans, and servlets/JSP. Each unit includes specific tasks such as demonstrating client-server communication, creating web pages with HTML/CSS, implementing AJAX, and managing databases with JDBC. The exercises aim to enhance skills in various programming concepts and technologies.

Uploaded by

dinit85311
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Practical questions1

The document outlines practical programming exercises across five units focusing on Java, web design, scripting, enterprise Java beans, and servlets/JSP. Each unit includes specific tasks such as demonstrating client-server communication, creating web pages with HTML/CSS, implementing AJAX, and managing databases with JDBC. The exercises aim to enhance skills in various programming concepts and technologies.

Uploaded by

dinit85311
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Practical questions

Unit I: Introduction and Core Java


1. Java Program: Write a program to demonstrate client-server
communication using sockets.
2. Inheritance: Create a Java program to demonstrate single and
multilevel inheritance.
3. Interface: Implement a Java interface and demonstrate how
multiple classes implement it.
4. Exception Handling: Write a Java program to handle various
exceptions (e.g., divide by zero, array index out of bounds).
5. Multithreading: Create a program that demonstrates the use of
threads for concurrent execution.
6. File Handling: Write a program to read from and write to a file
using Java I/O classes.
7. Array Manipulation: Implement a program that performs
various operations on an array (e.g., sorting, searching).
8. Java Event Handling: Create a GUI application in Java that
uses event handling (e.g., button click events).
9. AWT Controls: Write a program to demonstrate the use of
AWT components like buttons, labels, and text fields.
10. Calculator Application: Develop a simple calculator
application using Java Swing and AWT.
Unit II: Web Page Designing (HTML, CSS, XML, DHTML)
11. HTML Form: Create an HTML form with various input
types (text, radio, checkbox) and validate it with JavaScript.
12. CSS Styling: Design a webpage with CSS to demonstrate
the use of classes, IDs, and pseudo-classes.
13. Frames in HTML: Write an HTML document using
frames to display three web pages in a single browser window.
14. XML Document: Create an XML document to store data
about books (title, author, year) and display it in a web browser.
15. XML DTD: Write a DTD for the XML document created
in the previous question.
16. XML DOM Parsing: Use JavaScript to parse an XML file
and display data on a webpage.
17. Dynamic HTML: Create a webpage with dynamic content
that changes based on user input.
18. JavaScript Functions: Write a JavaScript function that
validates an email address format.
19. JavaScript Form Validation: Create a JavaScript
function to validate an HTML form for required fields and
correct input format.
20. CSS Layouts: Design a responsive webpage layout using
CSS Grid or Flexbox.
Unit III: Scripting (JavaScript, AJAX, Networking)
21. AJAX Example: Write a program to load data from a
server using AJAX without reloading the page.
22. Networking in Java: Implement a simple client-server
chat application using TCP.
23. Socket Programming: Create a Java program that sends
and receives messages over TCP sockets.
24. InetAddress Class: Write a Java program to get the IP
address of a given website.
25. AJAX with JSON: Use AJAX to fetch JSON data from a
server and display it on a webpage.
26. JavaScript Timer: Create a countdown timer using
JavaScript that updates every second.
27. Form Manipulation with JavaScript: Write a JavaScript
code to add and remove form fields dynamically.
28. AJAX Form Submission: Create an HTML form that
submits data using AJAX and displays the response.
29. Session Storage: Implement a JavaScript program to store
user data in session storage and retrieve it later.
30. Fetch API: Use JavaScript’s Fetch API to retrieve data
from a public API and display it on a webpage.
Unit IV: Enterprise Java Beans and JDBC
31. JavaBean Class: Create a JavaBean for a Product with
properties like id, name, and price, with appropriate getter and
setter methods.
32. Session Bean Example: Write a program to demonstrate a
stateless session bean.
33. Entity Bean: Implement a simple entity bean to store and
retrieve information about a Student.
34. JDBC Connection: Write a Java program to connect to a
MySQL database using JDBC.
35. Data Manipulation with JDBC: Implement a Java
program to perform CRUD operations on a database table.
36. Prepared Statement: Write a Java program using
PreparedStatement to securely insert data into a database.
37. Transaction Management: Demonstrate the use of
transactions in JDBC (e.g., commit, rollback).
38. Stored Procedure with JDBC: Write a Java program to
call a stored procedure in a database.
39. Merging Data in JDBC: Use JDBC to fetch and display
data by joining two tables.
40. Stored Procedure for Transactions: Write a stored
procedure to manage multiple transactions and access it through
Java.

Unit V: Servlets and Java Server Pages (JSP)


41. Servlet Basics: Write a basic Servlet that displays "Hello,
World!" when accessed.
42. Handling HTTP GET Request: Create a Servlet that
takes input from an HTML form using the HTTP GET method
and displays it.
43. HTTP POST Request: Write a Servlet that handles form
data submitted via the POST method.
44. Servlet Lifecycle: Explain and demonstrate the Servlet
lifecycle methods (init(), service(), destroy()) with a sample
program.
45. Redirecting Requests: Write a Servlet that redirects the
user to another URL after a specific condition is met.
46. Session Tracking with Cookies: Implement a Servlet that
tracks user login status using cookies.
47. Session Tracking with HttpSession: Create a Servlet that
uses HttpSession to store and retrieve user data.
48. Request Parameters: Write a Servlet that accepts multiple
parameters from an HTML form and processes them
accordingly.
49. Servlet Context: Demonstrate the use of ServletContext to
share data between different Servlets in a web application.
50. Handling File Uploads: Implement a Servlet that handles
file uploads from an HTML form using multipart/form-data.
51. Basic JSP: Create a basic JSP page that displays
"Welcome to JSP!".
52. JSP Variables and Expressions: Write a JSP that accepts
user input and displays it using expressions.
53. Using JSP Directives: Demonstrate the use of page
directives in a JSP page.
54. JSP Form Handling: Create a JSP page that accepts user
data from a form and displays it.
55. Session Management in JSP: Use HttpSession to store
user data across multiple JSP pages.
56. JSP Implicit Objects: Write a JSP that demonstrates the
use of implicit objects like request, response, session, and out.
57. JSP Custom Tags: Implement a simple JSP custom tag to
display a message.
58. JSP Action Tags: Demonstrate the use of action tags like
<jsp:include> and <jsp:forward> in a JSP page.
59. JSP with JavaBeans: Create a JSP that uses a JavaBean to
display student information (id, name, and grade).
60. JSP and Database Connectivity: Write a JSP page that
connects to a database using JDBC to display records from a
table.

You might also like