+ 2

How to rotate a word in java?

29th May 2020, 6:48 AM
Ситникова Варвара
Ситникова Варвара - avatar
5 Réponses
+ 2
public class Program { public static void main(String[] args) { StringBuffer sb=new StringBuffer ("hiii"); System.out.print(sb.reverse()); } } try this StringBuffer is class in java which is mutable means you can change string but string class of java is immutable
29th May 2020, 7:14 AM
ABHISHEK
ABHISHEK - avatar
+ 2
It's not big code though he just need to know about class stringbuffer maybe he don't know coz i remember when i started learning java i get the same question in my mind and that time i don't know about stringbuffer class but okay i totally understand you too. thank you!
29th May 2020, 7:43 AM
ABHISHEK
ABHISHEK - avatar
29th May 2020, 7:47 AM
ABHISHEK
ABHISHEK - avatar