User-submitted Java Projects

21
4132 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
2374 reads
Dev's picture

Submitted by

Dev
String Tokenizer
The below example demonstrates the use of split() method in java.
Run It Now!
72
3688 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
2665 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
3791 reads

November 7, 2011

String Tokenizer


The below example demonstrates how to use StringTokenizer in java.
34
4140 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
3795 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
4144 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
3516 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".
74
3896 reads

November 7, 2011

The index Of Method


The below example demonstrates how to use indexOf method. In the below example the character '@' is checked in the String email_address using indexOf() method.