Concatenating a string in Java is the most easiest thing that you'll learn. You might already be familiar with one way using the simp...
Read More
Home » String Handling
Showing posts with label String Handling. Show all posts
Showing posts with label String Handling. Show all posts
Using Startswith() And Endswith() In String
Here is a dead simple tutorial on startsWith() and endsWith() . The startsWith() method is used to check if a string starts with a give...
Read More
How To Replace Backslash In Java?
Using the following way, we can easily replace a backslash in Java. The replaceAll() method, as you know, takes two parameters out of wh...
Read More
Compare Two Strings In Java Lexicographically
The compareTo(T ob) method in the Comparable class is implemented in the String class and this implemented method takes java.lang.String...
Read More
Check If String Is Palindrome In Java
Let us check if the string is a palindrome in Java. The idea is common, and the implementation is simple.These few lines will check the s...
Read More
Recursively Search For String In Java
Illustrating searching string recursively in Java and getting it's indexes & also no.of times the string occurred. This logic is...
Read More

Reverse Words And Letters In String
The following example illustrates reversing words and letters in a string. This is in fact a Google interview question and now it's sol...
Read More

Concat More Than 2 Strings In Java
A simple logic to concat more than 2 (unlimited) no.of strings in Java. Here is the piece of code. Concat Unlimited Strings - Example ...
Read More

Split String By Length In Java
An example on splitting a string after 'n' characters i.e. into chunks with n characters each in Java. Let's Split im...
Read More

Capitalize A String In Java
An example on making the characters after the space capital if they are not, in Java. Here is a logic that i've written and that's ...
Read More

Remove File Extension In Java
An example logic on filtering the name of the file without extension in Java using String Handling and Java IO Let's Filter i...
Read More

Get Extension Of A File In Java
An example logic on getting and printing extension of a file in Java using String handling and Java IO . Example // Import for Fi...
Read More

Count Spaces & Characters Other Than Spaces In A String In Java
An example logic on counting no.of spaces and characters other than spaces in a String in Java. Example /* Taken from gowtham.gutha...
Read More

Count No.Of Times A Word Repeats In String In Java
An example to calculate the no.of times a word repeats in a string in Java with a simple logic. Example // Import for Scanner im...
Read More

Count No.Of Digits In A String In Java
Counting number of numbers! An example on counting no.of numbers in a string in Java. Example /* Licensed under GNU GPLV2. Take...
Read More

Count Alphabets In A String In Java
Counting Alphabets not all characters! An example on counting only alphabets in a string in Java. Let's count! /* * Taken...
Read More

Reverse Words In A String In Java
Reversing words in a string An example on reversing words not letters, in a string in Java. Example import java.util.*; class Re...
Read More

Reverse A String In Java
Reversing a String An example for reversing a string in Java using reverse() method in StringBuffer with explanation. Example /...
Read More
Subscribe to:
Posts (Atom)