User-submitted Java Projects

69
2011 reads
Protected Modifier in java.
The below example demonstrates how to use Protected Modifier in java. The below example defines a protected class member of Class Employee named numEmployee , and accesses from Class FileProtect by c
Run It Now!
156
3143 reads

November 4, 2011

The compare Method


The below example demonstrates how to compare 2 strings in java. The below example defines two strings having value "Ape" and "App".
77
3010 reads

November 4, 2011

Declare Object


The below example demonstrates that all classes descend from the type java.lang.Object. The below example allows the user to view the superclass of class "SomeClass" & "SomeOtherClass" as output.
6
3073 reads

November 4, 2011

Making Decisions


The below example demonstrates how to use if conditional Statement in java. The below example takes input from user and displays "Who are you" if name is entered, or displays if "exit' is entered.
32
2783 reads
Arithmetic Operators For Variables In Java.
The below example demonstrates how to use arithmetic operators for variables in java. The below exampleperforms arithmetic operations on variable n,a,d and prints thier values as output.
Run It Now!
35
2797 reads
Assignment Operators For Variables In Java.
The below example demonstrates how to use assignment operators for variables in java. The below example assigns integer values to variables m,n,d of datatype Int and prints thier values as output.
Run It Now!
67
1581 reads

November 4, 2011

Hello World


The Hello World example below demonstrates how to print simple hello world message in java. This example prints Hello John message as output.

Upper and Lower Case

The below example demonstrates how to convert a string to upper case. Read more »
74
1880 reads
CMonk's picture

Submitted by

CMonk
Tags:

Numbers Sorting
This is a very small program to sort 5 numbers. This sorting algo used is insertion sort.
Run It Now!
267
3605 reads

November 4, 2011

JavaStringVariables


The below example demonstrates how to concatenate (add) strings and display the result. The below example uses two Strings named first_name and family_name, assigns value to them and displays the va