About 90,000 results
Open links in new tab
  1. Reverse a string in Java - Stack Overflow

    Sep 10, 2017 · I have "Hello World" kept in a String variable named hi. I need to print it, but reversed. How can I do this? I understand there is some kind of a function already built-in into Java that does th...

  2. How can I reverse a single String in Java 8 using Lambda and …

    Nov 27, 2017 · I have one string say "Aniruddh" and I want to reverse it using lambdas and streams in Java 8. How can I do it?

  3. What is the most efficient algorithm for reversing a String in Java ...

    Mar 14, 2010 · As an aside: note that reversing the sequence of code-points is not the same as reversing "the string". For example, combining characters: if you just reverse the code-points then they end up combining against what was originally the previous character - so "aĉe" (if written with a combining character) could become "ecâ".

  4. string - Reverse a given sentence in Java - Stack Overflow

    Can anyone tell me how to write a Java program to reverse a given sentence? For example, if the input is: "This is an interview question" The output must be: "question interview an is this"

  5. Reversing a String with Recursion in Java - Stack Overflow

    The call to the reverce (substring (1)) wil be performed before adding the charAt (0). since the call are nested, the reverse on the substring will then be called before adding the ex-second character (the new first character since this is the substring)

  6. java - Reversing a String from user's input - Stack Overflow

    For loop** - Looping over each character of the string starting from last character of the string. reverse** - appending each char to form new string. I would suggest to use StringBuilder instead of using String concatenation.

  7. java - Reverse a string without using string functions - Stack …

    Aug 2, 2016 · Considering Java I think we cannot accomplish reverse without using functions since it does not support pointers directly.

  8. java - Reverse each word of user given string without altering their ...

    Aug 6, 2015 · I need a little help. I found a question like "Write a Java program that will reverse each word of user given string without altering their position and using any built in function." I solved a ...

  9. java - Displaying a string backwards using substring - Stack Overflow

    Jul 8, 2012 · It works properly but I'd like to do it in another way, that is, using a for loop, getting each character in the string using substring method with two parameters, starting with the last character then concatenates that one-character substring with the …

  10. Whats the best way to recursively reverse a string in Java?

    May 14, 2009 · That's definitely how I'd go about recursively reversing a string (although it might be nice to extend it to the case of an empty string in your condition.) I don't think there is any fundamentally better way.

Refresh