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!
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.
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
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.
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".
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.