0
create a GUI application to accept a string and display it in reverse order using the substring () method
3 Respostas
0
new StringBuilder("hello").reverse().toString() ;
0
String a,b="";
a=jTextField1.getText();
int c=a.length();
for(int i=c-1;i>=0;i--)
{
b=b+a.substring(I,i+ 1);
}
jTextField2.setText(""+b);
0
String x,y;
y="";
x=jTextField1.getText();
int z=x.length();
for(int i=z-1;i>=0;i--)
{
y=y+x.substring(i,i+1);
}
jTextField2.setText(y);