strings reading


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: strings reading

  1. #1
    Join Date
    Feb 2010
    Posts
    2

    Smile strings reading

    I am new at java and i have a problem/
    it says (3) reads a string from the key board and stores it
    in a string variable named s1, (4) uses recursion to reverse the string and store the reversed string in
    s2", (5) compares s1 to s2 to determine if the string is a palindrome, and (6) prints the input string, the
    input string without blank spaces, the output string, and a statement whether or not the input string is a palindrome or not.
    This is what i gave so far
    import java.io.*;
    public class sysIn {

    public static void main(String args[]) {
    try {
    BufferedReader in = new BufferedReader(new
    InputStreamReader(System.in));
    System.out.print("Name:");
    String s1 = in.readLine();
    System.out.println(s1);
    }
    }

  2. #2
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    What is the question?
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 6
    Last Post: 02-23-2009, 02:13 PM
  2. Strings in Structures
    By S0n1C in forum C++
    Replies: 8
    Last Post: 03-31-2007, 08:31 PM
  3. Replies: 5
    Last Post: 06-19-2006, 10:48 AM
  4. reading strings into integers
    By Complete in forum VB Classic
    Replies: 1
    Last Post: 12-27-2005, 04:48 PM
  5. java problem
    By Transform in forum Java
    Replies: 0
    Last Post: 11-18-2005, 06:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center