There are only few methods in java.io.Console class
I would recommend you to read the javadoc (please have a look at the above link). And then you should solve some mock exam questions too.
Note that netbeans does not support the console class internally.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
When you call System.console(), it will only return an instance of Console class if one is available. If the program is running in an environment which doesn't have a console, then null is returned...
So in order to execute the program will the upgrading the version of java from 1.5 to 1.6 will help or only console needs to be added to netbeans ....As Kathy says java.io.Console is the latest in version 1.6....I also tried this program on another computer with version 1.6 java it was successfully executing........
If you want to use java.io.Console you need to hava java 1.6. The problem is that if you develop in netbeans, the console class will not be available because netbeans does (not yet) support it.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Don't get me started about those stupid light bulbs.