|
-
Jan 3rd, 2001, 11:26 AM
#1
Thread Starter
Dazed Member
Hello everyone! I hope everyones holiday was good.
Im having a little trouble passing an object and im not
to sure as to what i an doing wrong. Instead of bogging you down with a lot of code from my program ill just give you a general idea of what im trying to do with a little code snippet.
import java.io.*;
class myclass{
public static void main(String[] args){
BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
//The "standard" input stream System.in is represented by the variable stdIn
menu(stdIn); // function call
} // end main
public static void menu(Object stdIn){
String choice = "";
System.out.println("Enter a choice");
choice = (stdIn.readLine());
if(choice.equals("C") || choice.equals("c"))
}
} // end class
// i need to pass stdin to the to menu method so i can use the readLine() function but with what i have i get compile
errors. any suggestions would be great!
thanks
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
|
Click Here to Expand Forum to Full Width
|