String
- 02 August
How to find length of string in java without using length() method
One of the interview question is “How to find length of string in java without using length() method.” There are many ways to find length of String. Some of them are : Using toCharArray is simplest solution. Using toCharArray Logic Convert string to char array using toCharArray method Iterate over char array and incrementing length […]
- 01 August
Java program to reverse a String
In this post, we will see java program to reverse a String. There are many ways to do reverse a String in java, some of them are: Using for loop Declare empty String reverse. This will contain our final reversed string. Iterate over array using for loop from last index to 0th index Add character […]
- keyboard_arrow_left Previous
- 1
- …
- 8
- 9
- 10