How to print the reverse of the String java is object orientated language without using any predefined function like reverse()?
java is object orientated language
reverse()
public class ReverseWithoutStringAPI { public static void main(String[] args) { String st="hello"; StringBuffer b=new StringBuffer(); for(int i=st.length()-1;i>=0;i--){ b.append(st.charAt(i)); } System.out.println("reverse:::"+b); } }