User-submitted Java Projects

75
4796 reads

March 1, 2013

Demonstrate a block of code


The block is the simplest type of structured statement. Its purpose is simply to group a sequence of statements into a single statement. The format of a block is:

{
statements
}

47
5318 reads

March 1, 2013

Demonstrate the for loop


The for Loop:
A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.

58
6838 reads

March 1, 2013

Demonstrate the if


IF Statements

66
8588 reads

March 1, 2013

Short example.


Local Variables:

95
22339 reads

March 1, 2013

Simple Java program.


In the Java language, when you execute a class with the Java interpreter, the runtime system starts by calling the class's main() method.

36
1011 reads
28
1210 reads
33
1148 reads
Ramadevi's picture

Submitted by

Ramadevi
PalindromeOfaString
you need to enter a string from the keyboard.The program gives you an output whether the entered string is a palindrome or not.
Run It Now!
235
4656 reads

February 27, 2013

FindInline


This example describes findInLine() method to find a pattern in a string. It attempts to find the next occurrence of the specified pattern ignoring delimiters.

203
2636 reads

February 27, 2013

Average with Scanner


This example demonstrates the Scanner class for input and calculating the average of input numbers. Input "done" to display average.