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

Class12 Java Project

This document is a Class 12 Java project file containing 20 Java programs that cover essential and advanced Java concepts, aimed at enhancing students' coding skills and preparing them for practical examinations. The programs include topics such as object-oriented principles, data structures, file handling, and GUI development, with each program well-commented for clarity. The index lists various programs, including a Hello World program, Prime Number Checker, and examples of inheritance, exception handling, and GUI applications.

Uploaded by

ashokkedia177
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)
22 views5 pages

Class12 Java Project

This document is a Class 12 Java project file containing 20 Java programs that cover essential and advanced Java concepts, aimed at enhancing students' coding skills and preparing them for practical examinations. The programs include topics such as object-oriented principles, data structures, file handling, and GUI development, with each program well-commented for clarity. The index lists various programs, including a Hello World program, Prime Number Checker, and examples of inheritance, exception handling, and GUI applications.

Uploaded by

ashokkedia177
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

Class 12 Java Project File

Student Name: ____________________________


Roll Number: ____________________________
Introduction
This project file contains 20 Java programs covering fundamental and advanced concepts of Java programming,
including object-oriented principles, data structures, file handling, exception management, and GUI development.
The programs are designed to help Class 12 students understand the practical applications of Java, improve
coding skills, and prepare for board practical examinations. Each program is well-commented for clarity.
Index
1. Hello World Program
2. Prime Number Checker
3. Fibonacci Series
4. Factorial Calculation
5. Palindrome Checker
6. Armstrong Number Checker
7. Matrix Addition
8. Bubble Sort
9. Binary Search
10. File Copy Operation
11. Student Class with Inheritance
12. Method Overloading
13. Abstract Class Example
14. Interface Example
15. Exception Handling Demo
16. Multithreading Example
17. Synchronization Example
18. Simple GUI using Swing
19. Applet Example
20. ArrayList Demonstration
Hello World Program
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Prime Number Checker
import java.util.Scanner;
public class PrimeChecker {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("Enter a number: ");
int num = sc.nextInt();
boolean isPrime = true;
if (num <= 1) isPrime = false;
for (int i = 2; i <= Math.sqrt(num); i++) {
if (num % i == 0) {
isPrime = false;
break;
}
}
System.out.println(num + " is " + (isPrime ? "a prime number." : "not a prime number
sc.close();
}
}

You might also like