String
- 28 October
Convert UUID to String in Java
Introduction In this article, we will have a look on How to Convert UUID to String in Java. We will also shed some light on the concept of UUID, its use, and its corresponding representation in Java class. Let us have a quick look at UUID. UUID: UUID stands for Universally Unique Identifier which identifies […]
- 27 September
Repeat String N times in Java
Introduction In this article, we will learn how to Repeat a given String N times in Java . This is a trick question common in JAVA interviews and the candidate’s evaluation is based on different approaches he/she provides for the problem. So we will take a deep dive into looking at various ways to solve […]
- 15 September
How to Replace Space with Underscore in Java
Learn about how to replace space with underscore in java. Replace space with underscore in java 1. Using replace() method Use String’s replace() method to replace space with underscore in java. String’s replace() method returns a string replacing all the CharSequence to CharSequence. Syntax of replace() method: [crayon-6729909652318249191794/] [crayon-672990965231d142967125/] Output: This_blog_is_Java2blog As you can see, […]
- 15 September
How to Replace Comma with Space in Java
Learn about how to replace comma with space in java. Replace comma with space in java 1. Using replace() method Use String’s replace() method to replace comma with space in java. Here is syntax of replace() method: [crayon-672990965244a940439483/] [crayon-672990965244d242828738/] Output: 1 2 3 4 As you can see, replace() method replaced each comma with space […]
- 11 June
Remove Parentheses From String in Java
Java uses the Strings data structure to store the text data. This article discusses methods to remove parentheses from a String in Java. Java Strings Java Strings is a class that stores the text data at contiguous memory locations. The String class implements the CharSequence interface along with other interfaces. Strings are a constant data […]
- 08 February
Escape percent sign in String’s format method in java
In this post, we will see how to escape Percent sign in String’s format() method in java. Escape Percent Sign in String’s Format Method in Java String’s format() method uses percent sign(%) as prefix of format specifier. For example: To use number in String’s format() method, we use %d, but what if you actually want […]
- 07 February
Get Unicode Value of Character in Java
In this post, we will see how to get unicode value of character in java. Get Unicode Value of Character in Java You can simply use below code to get unicode value of character in java. [crayon-67299096534c5359803584/] Here is complete example to print unicode value of character in java: [crayon-67299096534c7790601144/] Output Unicode value of character […]
- 02 February
Find Character in String in Java
In this post, we will see how to find character in String in java. How to Find Character in String in Java There are multiple ways to find char in String in java 1. Using indexOf() Method to Find Character in String in Java indexOf() method is used to find index of substring present in […]
- 13 July
Remove substring from String in Java
In this post, we will see how to remove substring from String in java. There are multiple ways to remove substring from String in java. Using String’s replace method to remove substring from String in Java This method belongs to the Java String class and is overloaded to provide two different implementations of the same […]
- 1
- 2
- 3
- …
- 10
- Nextkeyboard_arrow_right