Showing posts with label String. Show all posts
Showing posts with label String. Show all posts

Create user defined substring functions

In many interviews we may asked to substring() a string without using substring function from String class. Below are the simple code how we can write our own substring functions similar to String class...

Character Array to String in Java

We may seen lot of arrays like Integer, Character, Float and Double or even String array. In this tutorial we will see about converting Character array to String in Java code. We can achieve...

Calculate String Length

 

This is one of the simple interview question that need to calculate String length without using length() function. There are lot of ways to find the find the length like converting String to Character...

String replace in java

We all know that String class is a immutable and values once stored will not be changed. So what is String replace and how its working in java? basically whenever we change are replace...

Character Frequency in String

This is one of the easy interview programming question under 3 years experience. Lets assume given a lengthy string and asked you to find each character frequency. For example the given string is "hello...

Java String

We all know String class in Java is immutable and the value once stored in String Object can't be modified. Also we have discussed about this in our earlier tutorials like difference between String,...

Split() in Java

In our earlier tutorial we have seen about String Tokenizer class in Java. And we have given Split method from String class which will be an alternate since String Tokenizer is legacy class. So...

String Tokenizer in Java

In most of the older application we will be seen String Tokenizer class used for operations like splitting words or text from a given String or line. The String Tokenizer class allows user to...

Difference between String, StringBuffer and StringBuilder

In this tutorial we will see about difference between String, StringBuffer and StringBuilder. The most important difference that String Object is immutable but whereas StringBuffer/ StringBuilder are mutable.  So what is immutable and mutable?...