create a GUI application to accept a string and display it in reverse order using the substring () method | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

create a GUI application to accept a string and display it in reverse order using the substring () method

30th Aug 2016, 5:59 AM
ranjeet
3 Answers
0
new StringBuilder("hello").reverse().toString() ;
30th Aug 2016, 6:26 AM
Hemanth S
Hemanth S - avatar
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);
12th Jun 2018, 7:29 AM
Vishal Kumar
Vishal Kumar - avatar
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);
14th Jun 2018, 7:49 AM
Ravi Kumar
Ravi Kumar - avatar