Hi this is the solution that i came up with to inverse a string
public static void main(String[] args) {
// TODO Auto-generated method stub
String b="bhashitha";
b.length();
int p=0;
String inverse="";
while(p<b.length()){
inverse+=b.charAt(b.length()-1-p);
p++;
}
System.out.println(inverse);
}