#Java Lab Programs with Comments & Outputs
This repository contains 14 Java lab programs with detailed comments and sample outputs. It is designed for students to learn Java programming concepts step by step.
- Sum of Two Numbers – Accept two numbers and print their sum
- Addition Using a Method – Demonstrates method prototyping
- Function Overloading – Calculate average using overloaded methods
- Overloaded Constructor – Calculate box volume
- Inheritance – Display student details
- Package Concept – Demonstrate usage of a custom package
- Interface Implementation – Square and cube calculation
- Exception Handling – Division by zero handling
- Multithreading – Demonstrate concurrent threads
- JDBC with GUI – Student information management
- Applet – Display "Hello World"
- Applet with Controls – Add user input and button
- Swing Application – Basic GUI with a button
- Servlet with Session – Student registration using servlet
- src/ → Contains all Java source files
- Lab_Manual_Commented.pdf → PDF lab manual
- README.md → This file
- Open the
src
folder and choose a Java file. - Compile using:
javac FileName.java
- Run using:
java FileName
- For package example, maintain folder structure:
javac mypack/Utility.java MainApp.java
java MainApp
- For GUI programs (Swing, Applet, JDBC), run in IDE or browser as appropriate.
- Applets are deprecated; use
appletviewer
or legacy browsers. - Servlets require a Jakarta/Tomcat server.
- This repository is for learning and educational purposes.# Java-Lab-Programs Java Lab Programs RGPV