Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-01-2007, 06:10 PM
Member
 
Join Date: Aug 2007
Posts: 1
maram is on a distinguished road
how to make abcxyz to zyxcba
Quote:
import javax.swing.JOptionPane;
import java.util.Scanner;
public class Change{
public static void main (String[]args){
String Input = JOptionPane.showInputDialog("Enter Word: ");
for(int i=0; i<Input.length()-1; i++)
JOptionPane.showMessageDialog(null,("The Results Is : " + i ));
}
}
I can get the result but I've to click manually to get it..
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-01-2007, 08:21 PM
Member
 
Join Date: Aug 2007
Posts: 15
yiweiang is on a distinguished road
Let me see if i've got your question right. You have one string and you just want to flip it over.
public class StringFlip
{
public static void main(String Args[])
{
String a="abcde";
String b="";

for(int x=a.length();x>0; x--)
{
b=b+a.substring(x-1,x);
}

System.out.println(b);
}
}

Tell me if this is what you are looking for.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a modal JFrame? surot New To Java 10 04-11-2008 07:40 AM
i need help to make this program masaka New To Java 2 03-23-2008 02:26 PM
Can't make JTable work -- please help!! cagalli83 Advanced Java 0 02-13-2008 10:31 AM
How to make popups like in eclipse ekadosh SWT / JFace 0 02-04-2008 08:58 AM
can i make a login form? mitsakos New To Java 2 12-19-2007 11:14 PM


All times are GMT +3. The time now is 06:18 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org