Pergunta de entrevista da empresa Spotify

Reverse a string, reverse only words of a string, inline implementation of reverse words in a string?

Resposta da entrevista

Sigiloso

12 de dez. de 2018

public class StringReverse { public static void main(String[] args){ String string="Hello World"; StringBuffer sb= new StringBuffer(string); sb.reverse(); System.out.println(sb); } }

2