User-submitted Java Projects

39
2122 reads
Overriding Methods from Object
The below example demonstrate the use of equals() in java.
Run It Now!
21
3925 reads
Parsing HTTP User-Agent Strings
The below example demonstrates how to determine user-agent (browser name,OS name) of the client. The below example prints the operating system name and browser name as output.
Run It Now!
35
2146 reads
Dev's picture

Submitted by

Dev
String Tokenizer
The below example demonstrates the use of split() method in java.
Run It Now!
72
2882 reads

November 7, 2011

String Tokenizer


The below example demonstrates the use of split() method in java. The below example passes comma, space, or period as delimiters to split() to split the string into string of arrays.
69
2430 reads
Anglina85's picture

Submitted by

Anglina85
Short Variable.
The below example demonstrates how to assign values of short data-type to a variable. The below example prints the value of variable as output.

Run It Now!
77
2969 reads

November 7, 2011

String Tokenizer


The below example demonstrates how to use StringTokenizer in java.
34
3121 reads

November 7, 2011

String


The below example demonstrates how to use printf() method in java. The below example shows the different way to define strings(s1,s2,s3,s4).
65
2911 reads

November 7, 2011

The replace Method


The below example demonstrates how to replace a part of a string, using the replace() method. In the below example string aString contains value "Where are you books?".The replace() method checks the
89
3315 reads

November 7, 2011

The equals Method


The below example demonstrates the usage of the equals() method. The below example defines two different Strings and uses equals() method to compare whether the two Strings are equal or not.
77
2734 reads

November 7, 2011

The substring Method


The example below demonstrates how to use substring() method to return a String from a String. In the example below String FullName has value "Bill Gates".