-
Reading a String from the keyboard
I am a java beginner, I have to design a program for my java class that entails
setting up a reservation for a customer. I am to get the user to input their
name. First, Middle, and Last. It should be stored in an array and the subscript
is their chosen reservation room. Any help would be greatly appreciated.
-
Re: Reading a String from the keyboard
I'm not sure what you have been exposed to, but this will hopefully get you
started.
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);
}
catch (IOException io) {}
}
}
"Jeanie" <lunar528@aol.com> wrote in message
news:3a8df02f$1@news.devx.com...
>
> I am a java beginner, I have to design a program for my java class that
entails
> setting up a reservation for a customer. I am to get the user to input
their
> name. First, Middle, and Last. It should be stored in an array and the
subscript
> is their chosen reservation room. Any help would be greatly appreciated.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks