Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Client/Server Questions

  1. #1
    Junior Member
    Join Date
    Jan 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Client/Server Questions

    Hello, I have a Client and Server that communicate with each other in terms of knock knock jokes. I would like to know how you would reverse the characters of the input from the user. So if you typed in "Who's there?" it would display "?ereht s'ohW". Also it would display the knock knock joke in reverse as well. Thanks!

    Here are the codes for them as well

    KnockKnockServer.java -SERVER

    KnockKnockClient.java -CLIENT

    KnockKnockProtocol.java PROTOCOL


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Client/Server Questions

    I would like to know how you would reverse the characters of the input from the user.
    That sounds like a String and array problem requiring the use of an index and a loop.
    What problems are you having? Please post your code for solving this problem and ask any questions you have.

  3. #3
    Junior Member
    Join Date
    Jan 2012
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Client/Server Questions

    StringBuffer class has a reverse() method that does excactly what you want.

Similar Threads

  1. server and client
    By lanpan in forum What's Wrong With My Code?
    Replies: 2
    Last Post: December 24th, 2011, 09:29 AM
  2. Questions on simple client-server app
    By worwhite in forum Threads
    Replies: 24
    Last Post: July 30th, 2011, 08:19 PM
  3. TCP/IP java client, c++ server
    By akboyd88 in forum Java Networking
    Replies: 0
    Last Post: March 24th, 2011, 10:46 AM
  4. Client/Server
    By Dillz in forum Paid Java Projects
    Replies: 2
    Last Post: June 2nd, 2010, 05:19 AM
  5. [SOLVED] The concept of Server and Client
    By rendy.dev in forum Java Theory & Questions
    Replies: 3
    Last Post: January 18th, 2010, 04:13 AM