How to join multiple strings using append(), StringJoiner, String.join() in Java

In this tutorial we will see the difference between StringJoiner and String.join(). These were introduced into Java 8 version. The example we create here will show how to join multiple string objects or literals or list of strings using append(), StringJoiner, String.join() API. Situation may occur when you need to join multiple string literals or objects into one. You may…

Remove Duplicates from String using Java

Introduction Removes duplicates from String will remove duplicate characters (if any) from String using Java programming language. For example, let’s say we have a string roytuts and we want to remove duplicates from this string. So in this string the duplicate character is t. Therefore after removing duplicate characters we will get the final string roytus.

Extract Numeric Values from a String in Java

This tutorial will show you how we can extract the first non-breakable numeric values from a string using Java as well as all numeric values from the string. I am going to use regular expression for extracting the numeric values from string. I am going to use d and w for representing digits and characters in the string. This example…

Append-String Transformer in Mule ESB

What is Mule ESB ? Mule ESB is a lightweight Java-based enterprise service bus (ESB) and integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data. Mule ESB enables easy integration of existing systems, regardless of the different technologies that the applications use, including JMS, Web Services, JDBC, HTTP, and more. This example…

File-To-String transformer in Mule ESB

What is Mule ESB ? Mule ESB is a lightweight Java-based enterprise service bus (ESB) and integration platform that allows developers to connect applications together quickly and easily, enabling them to exchange data. Mule ESB enables easy integration of existing systems, regardless of the different technologies that the applications use, including JMS, Web Services, JDBC, HTTP, and more. This example…

Verify A String Contains Only Numeric Value Using Java

Introduction The below example shows how to verify that a string contains only numeric value in Java. String may contain float value, double value etc. This example uses regular expression to check a string contains only numeric values. It makes sure that your string should contain only digits and dot(.). You may need sometimes to use string variable for storing…

String Reverse Example In Java

String Reverse This tutorial will show you string reverse example in Java. You can use various ways to reverse a string in Java and I have presented here five ways to reverse a string. String class in Java is an immutable class and that’s why it does not have reverse() method to reverse the given string. I will use here…