How to work with standard input?
I am a very beginner with developing Nokia applications with java.
I was looking for very simple code examples, but only find very complicated stuf.
Just starting using simple standard input and output.
The first problem I encounter is, that I can work with standard output (System.out), but the Nokia SDK doesn't recognize things like System.in?
A simple piece of code:
System.out.print("Enter your name: ");
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
(I did the import: import java.io.*; )
Even BufferedReader is not known...
I wrote already a simple text-based game and wanted to bring it to my Nokia, but not all code can be re-used?
thanks for your help!
Re: How to work with standard input?
System.in does not work in Java 2 Micro Edition. On a phone, it is complete invisible. You have to move to LCDUI. If your Java code follows the model-view-controller principle, you are able to port much of your Standard Edition code. Nevertheless, J2ME is quite different but not too difficult. Give it a 2nd chance.