The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

very simple program cannot figure whats wrong ;)

Posted by Julio Torres on October 19, 2000 at 6:46 PM

I got a Program that gets a random String
and prints the strings on characters
letter by letter
my code so far:
import java.io.*;
public class a2n2

{


public static void main (String [] args)throws IOException
{
String s;


BufferedReader kb = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter your Name:");
s = kb.readLine();


int count= s.length();
int pos=0;
char chs= s.charAt(pos);
chs = s.charAt(pos);
//System.out.println("letter:" + chs);

for ( pos=0; pos <= chs; count+);
{
count=pos + count;
System.out.println("display:"+ count);
}
}
}

please reply with a hint what i am doing wrong




Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us