Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
2 views

Java Programs

The document outlines various Java programming concepts and examples, including basic operations, control structures, object-oriented programming principles, and GUI components. It covers topics such as operators, classes, inheritance, exception handling, threading, applets, and collections. Additionally, it includes practical examples for implementing these concepts in Java applications.

Uploaded by

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

Java Programs

The document outlines various Java programming concepts and examples, including basic operations, control structures, object-oriented programming principles, and GUI components. It covers topics such as operators, classes, inheritance, exception handling, threading, applets, and collections. Additionally, it includes practical examples for implementing these concepts in Java applications.

Uploaded by

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

1 Print "Hi ...

Welcome to Java World"


2 addition of two integers.
3 Display prime numbers between 1 and 200
4 Display Floyd’s triangle
5 Display Floyd’s triangle
6 Fibonacci series
7 Display different patterns of * (One)
8 Display different patterns of * (Two)
9 Arithmetic operators
10 Assignment operators
11 Conditional operators
12 Bitwise operators
13 Shift operators
14 Instanceof operator
Classes in Java
15 Auto Initialization
16 Inline Initialization
17 Complete Initialization
18 Local variable and Data members
19 Object creation
20 Data Hiding
21 Polymorphism
22 Constructor Overloading
23 Function Overloading
24 Type casting
Path setting
Class path setting
Batch file
Garbage Collection

25 Example of Garbage Collection


Wrapper class
26 Wrapper class object
Converting to primitive data type by using
27 Wrapper class methods
28 Use of this as a reference
29 Use of this() as a method
30 Inheritance
31 Use of super as a reference
32 Use of super() as a method
33 Method Overriding
Package, Subpackage
34 Example of package
35 Example of Sub package
36 Import
37 Use of package in object creation
38 Use of package in inheritance
39 Use of 2 packages in inheritance
40 Use of array in java
Inputting 2 integers from keyboard and
41 display their sum
Enter 10 numbers from key board and
42 display them after sorting them in ascending
Enter a number from key board and display
43 sum of digits of the number
Access Modifiers
44 Static data member
45 Static block
46 Final data member
47 Abstract method members
48 Abstract class
Interface
49 Example of interface
Exception Handling
50 Use of try…catch
51 Use of throw
52 Use of throws
53 Use of finally

Thread
54 Multi Threading
55 Use of setPriority() for a thread
56 Use of Thread.sleep()
57 Use of Runnable interface
Applet
Applet(Use of init(), start(), paint(), stop(),
58 destroy())
Display Hello inside a rectangle on one
59
Applet
60 Design a face on one Applet
61 Move a ball from left to right on one Applet
Rotate a line about one of its end points on
62 one Applet
63 Rotate a line about its centre on one Applet
64 Design a clock on one Applet
Applet with Thread(Design of Banner
65 "Happy Holi")
Event Handling
Display Hello at every mouse click on one
66 Applet
Keep all the * generated for each mouse
67 click on an Applet
Draw a line between mouse press and mouse
68 release
Draw a rectangle between mouse press and
69 mouse release
Back ground color change on mouse enter
70 and exit in one Applet
71 Draw a line during mouse move
72 Draw a line during mouse drag
Componenet Class Hierarchy
73 Use of Frame
On one frame, take 4 buttons namely, Red,
Green, Blue and Exit. On clicking the
74 buttons different events will be fired
On one frame, perform addition of 2
75 numbers by using label, text field and Button
76 Design a Calculator

77 Checkbox
78 Radio Button
79 Choice
On a frame, rotating a line about one of its
80 end points
Delegation Event Model
81 Adaptor class
Stream
82 Reading characeters
File
Program to display files and directories in a
83 folder
84 Copying characters from one file to another
85 Copying bytes from one file to another
86 Reading and writing primitive data types
87 Creating your own Exception
88 Synchronization of Thread
Swing in Java
89 Swing Example using JFrmae
Swing Example using Jfrmae and JButton
90 assocaied with constructor
Swing Example using Jfrmae and JButton
91 assocaied with inheritannce
Swing Example using Jfrmae, JTextField,
92 JLabel and JButton to show country name if
93 Swing program using SwingUtilities
String
94 String Example
StringBuffer
StringBuffer Example to explain append()
95 method
StringBuffer Example to explain insert()
96 method
StringBuffer Example to explain replace()
97 method

StringBuffer Example to explain delete()


98 method
StringBuffer Example to explain reverse()
99 method
StringBuffer Example to explain capacity()
100 method
StringBuffer Example to explain
101 ensureCapacity() method
Java Beans
102 Example of Java Beans
Servlet
103 Example - 1 of Servlet
104 Example - 2 of Servlet
Collections
105 ArrayList
106 LinkedList
107 Vector
108 Stack
109 PriorityQueue
110 ArrayDeque
111 HashSet
112 LinkedHasSet
113 TreeSet
114 Use of Menu and MenuBar in Frame
JDBC
115 JDBC with Frame
Newtworking in Java (One way
116
Communication)
Two way communication between 2
117
computers

You might also like