User-submitted Java Projects

36
1892 reads
eddie14's picture

Submitted by

eddie14
sampleRaone
Ra One Program
Run It Now!
36
2399 reads
SillySall's picture

Submitted by

SillySall
Nested Inner Classes
The below program demonstrates how to create nested inner class in java. In the below example , Class Inner is defined within Class Outer and can access Class Outer's datafield.
Run It Now!
39
2037 reads
Named Local Inner Classes
The below program demonstrates how to create named local inner class.
Run It Now!
37
2684 reads
Anonymous Local Inner Classes
The below program demonstrates how to create anonymous local inner class.
Run It Now!
24
1923 reads
Non-Static Member Inner Classes
The below program demonstrates how to create non-static inner class in java. In the below program, class LifeBenefit is a innerclass to class LifePolicy .
Run It Now!
32
2182 reads
Static Member Inner Classes
The below program demonstrates how to create a static inner class and access it. The below program has class LifePolicy which defines a Static Inner class LifeBenefit which extends class Benefit.
Run It Now!
35
1998 reads
SillySall's picture

Submitted by

SillySall
Object Cloning
The below program demonstrates how to clone an object. In the below program x1,x2 are two objects of class TestClone1 which implements cloneable.The x1 object is clone and assigned to x2 object.
Run It Now!
64
2480 reads
Cloning Objects with Object Data Fields Example
The below example demonstrates how to clone an object with object data field example.
Run It Now!
75
2269 reads
Stephens's picture

Submitted by

Stephens
Clonning an Object Example
The below example demonstrates how to clone an object in java. The below example creates two objects(p,q) of Class Point. The object p is cloned and assigned to object q.
Run It Now!
80
2196 reads
Stephens's picture

Submitted by

Stephens
Reference Assignment
The below example demonstrates how to assign a reference to an object. The below example creates two different objects for class Point.
Run It Now!