Skip to main content
Close announcements banner

Replacing an element in a string

It is easy to use the CHANGE routine along with a tJava component, to replace one element in a string with another:

System.out.println(StringHandling.CHANGE("hello world!", "world", "guy"));

The routine replaces the old element with the new element specified.

The result is "hello guy!" in the Run view.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!