This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Console class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Console class" Watch "Console class" New topic
Author

Console class

Ashish K. Singh
Greenhorn

Joined: Jan 31, 2009
Posts: 5

I am getting the following error :
ConsoleTest.java:3: cannot find symbol
symbol : class Console
location: class ConsoleTest
Console conc = System.console();
^
1 error

Do i have to include any package to use this class Console ? Thanks
Ashish K. Singh
Greenhorn

Joined: Jan 31, 2009
Posts: 5
Okies, that was my bad. I got it now. I need to import java.io.Console and also use char[] for taking the passwd. And also it is foolish of me to print out the passwd. Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Console class
 
Similar Threads
please correct the code
[newbie] Null pointer exception ??
Problems to use Console object on Java 6
Why does cons remain equal to null?
Password Checking