About 1,420,000 results
Open links in new tab
  1. String concatenation in Java - when to use +, StringBuilder and …

    Jul 29, 2015 · When should we use + for concatenation of strings, when is StringBuilder preferred and When is it suitable to use concat. I've heard StringBuilder is preferable for concatenation …

  2. java - Difference between StringBuilder and StringBuffer - Stack …

    Dec 10, 2008 · What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?

  3. string - When to use StringBuilder in Java - Stack Overflow

    It is supposed to be generally preferable to use a StringBuilder for string concatenation in Java. Is this always the case? What I mean is this: Is the overhead of creating a StringBuilder object,

  4. What's the best way to build a string of delimited items in Java?

    Sep 15, 2008 · While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would …

  5. java - Palindrome Checker using StringBuilder - Stack Overflow

    May 26, 2017 · Im trying to create a palindrome checker. I am using a StringBuilder and I've discovered that appending spaces are kind of tricky. EDIT: are there other ways besides using …

  6. java - How to trim StringBuilder's string? - Stack Overflow

    Jun 19, 2012 · How can we trim a StringBuilder value without the overhead caused by using StringBuilder.toString().trim() and thereby creating a new String and/or a new StringBuilder …

  7. Java 8 Int Stream collect with StringBuilder - Stack Overflow

    I have a function that creates an int stream, finds the distinct characters, sorts them and then collects them into a new list and then creates a string. Below is the function. public static String

  8. java - how to use string builder to append double quotes and 'OR ...

    Sep 27, 2015 · This is my code where I will get set of values in a list array. how to use string builder to append double quotes and OR between all those elements and save to a string? …

  9. Produce a comma separated list using StringBuilder

    Oct 7, 2015 · Produce a comma separated list using StringBuilder Asked 9 years, 9 months ago Modified 9 years, 9 months ago Viewed 19k times

  10. java - Remove last character of a StringBuilder? - Stack Overflow

    Aug 3, 2010 · As of Java 8, the String class has a static method join. The first argument is a string that you want between each pair of strings, and the second is an Iterable<CharSequence> …