Programs Program to Demonstrate simple JAVA program Program to compute the area of a circle Program to demonstrate type casting in JAVA Program to demonstrate the basic Arithmetic Operations Program to find largest of three numbers Program to print first 10 Fibonacci numbers Program to Calculate the factorial of a number using RECURSION Program to print prime numbers using CLA Program to Demonstrate Command Line Argument Program to convert temperature from Fahrenheit to Celsius using CLA Program to produce conversion table dollar and rupees using CLA Program to print area of right angled triangle using CLA Program to print all the elements in an array using CLA Program to find the sum of all the elements in an array Program to print all the elements in a 2D array Program to find the sum of two matrices Program to find the difference of two matrices using CLA Program to print the UPPER and LOWER triangle of a matrix Program to find the trace of a matrix Program to find the transpose of a matrix Program to find the product of two matrices Program to demonstrate a CLASS Program to demonstrate a Constructor Program to demonstrate a Parameterized Constructor Program to Demonstrate THIS keyword Program to Demonstrate Constructor Overloading Program to pass objects as parameters Program to Demonstrate Queue using Class Program to Demonstrate Stack using Class Program to Demonstrate Access Specifiers Program to Demonstrate Static Variables Program to Demonstrate Static Methods Program to demonstrate an Inner class Program to Demonstrate Type Wrapping Program to Demonstrate Single Inheritance Program to Demonstrate Multilevel Inheritance Program to Demonstrate hierarchical Inheritance Program to show SUPER Class variable to refer a sub class object Program to Demonstrate Method Overriding Program to Demonstrate Runtime Polymorphism Program to Demonstrate Abstract Class
Program to Demonstrate FINAL Keyword Program to Demonstrate FINAL Method Program to Demonstrate FINAL Class Program to Demonstrate INTERFACE Program to access implementation through Interface references Program to Demonstrate EXTENDING INTERFACE Program to Demonstrate Stack using interface Program to Demonstrate Queue using Interface Program to Demonstrate a SIMPLE PACKAGE Program to Demonstrate Exception Program to Demonstrate TRY CATCH Program to Demonstrate CATCH ARITHMETIC Exceptions Program to Demonstrate Multiple CATCH Program to Demonstrate NESTED TRY Program to Demonstrate FINALLY clause Program to Demonstrate User Defined EXCEPTIONS Program to Demonstrate Throws Program to Demonstrate MULTITHREADING Program to Demonstrate Runnable Interface Program to Demonstrate Thread Priorities Program to Demonstrate Synchronized Block Program to Demonstrate Synchronized Method Program to Demonstrate Deadlock Program to Demonstrate Thread Methods Program to Create Threads using Thread Class Program to Demonstrate Join() & isAlive() methods Program to Show how to Get User Input from Keyboard Program to Create a Frame Window using Applet Program to Demonstrate Life cycle of methods in Applet Program to display Parameters Passed from HTML Program to Demonstrate all shapes in Graphics class Program to Show a Hut,Mountains & Face Program to Show Status of Applet Window Program to Show Position of the Mouse Program to Demonstrate Colors Program to Pass Parameters perform Mathematical Operations Program To Get Document Code Bases Program to Show an Image
Program to demonstrate an Adapter Program to Demonstrate Simple Banner Program to Demonstrate Button Program to Demonstrate Checkbox Program to Demonstrate Radio Buttons (Checkbox Group) Program to Demonstrate Choice
Program to Demonstrate File Dialog Program to Demonstrate Labels Program to Demonstrate Lists Program to Demonstrate Menu Program to Demonstrate Text Area Program to Make a Login Window Program to Make a Login Focus Program to Demonstrate Mouse Adapter Program to Demonstrate Mouse Events Program to Demonstrate the key event handlers Program to Demonstrate Border Layout Program to Demonstrate Card Layout
Program to Test Fonts Using Mouse Events Program to Demonstrate Grid Layout Program to Demonstrate Scrollbar
Program to Check Connection to Database Program to retrieve Records from Database Program to demonstrate Insertion into Database Program to demonstrate Update into Database Program to demonstrate Prepared Statement Program to Demonstrate Data Entry using Applet Program to Demonstrate Result Set Meta Data Program to Demonstrate Transaction handling Program to Demonstrate Callable Statement Program to Demonstrate Result Set Meta Data Program to Demonstrate Database Meta Data Program to add Interface Program to add Server Program to add Client Program for implementation for the interface Create a Policy to Allow Permission for Everyone
01 Program to Demonstrate simple JAVA program class A { public static void main(String args[]) { System.out.println("Welcome to my World"); } } ----------------------------------------------------------------------------------------Save the above Program as A.java Compile Program in Command by using javac C:\>javac A.java Run the Program in Command by using java C:\>java A --------------------------------------------------------------------------------------------OUTPUT : Welcome to my World
02 Program to compute the area of a circle class A2 { public static void main(String args[]) { int r=10; System.out.println("Radius of Circle :" + r); System.out.println("Area of Circle :" + r*r); } } OUTPUT : Radius of Circle : 10 Area of Circle : 314
03 Program to demonstrate type casting in JAVA class conversion { public static void main(String args[]) { byte b; int i=257; double d=323.142; System.out.println("\nConversion of int to byte."); b=(byte) i; System.out.println("i and b " +i+" "+b); System.out.println("\nConversion of double to int."); i=(int)d; System.out.println("d and i " +d +" "+i); System.out.println("\nConversion of double to byte."); b=(byte)d; System.out.println("d and b " +d + " " +b); } } OUTPUT : Conversion of int to byte. i and b 257 1 Conversion of double to int. d and i 323.142 323 Conversion of double to byte. d and b 323.142 67
04 Program to demonstrate the basic Arithmetic Operations class arith { public static void main(String args[]) { int a=10,b=3; System.out.println("sum is "+(a+b)); System.out.println("difference is "+(a-b)); System.out.println("product is "+(a*b)); System.out.println("quotient is "+(a/b)); System.out.println("remainder is "+(a%b)); } } OUTPUT : sum is 13 difference is 7 product is 30 quotient is 3 remainder is 1
05 Program to find largest of three numbers class large { public static void main(String args[]) { int a=10,b=30,c=20; System.out.println("Greatest of given 3 numbers"); if(a>b&&a>c) System.out.println(+a); else if(b>c) System.out.println(+b); else System.out.println(+c); } } OUTPUT : Greatest of given 3 numbers 30
07 Program to Calculate the factorial of a number using RECURSION class Factorial { int fact(int n) { int result; if(n==1) return 1; result=fact(n-1)*n; return result; } } class Recursion { public static void main(String args[]){ Factorial f=new Factorial(); System.out.println("Factorial of 3 is " +f.fact(3)); System.out.println("Factorial of 4 is " +f.fact(4)); System.out.println("Factorial of 5 is " +f.fact(5)); } } OUTPUT : Factorial of 3 is 6 Factorial of 4 is 24 Factorial of 5 is 120
Thank you for interesting in our services. We are a non-profit group that run this website to share documents. We need your help to maintenance this website.