Re: Help, why wrong ?!

2000-10-14 Thread Ali

Hi
Try this:

import java.io.*;
public class ReadKeyB {

public static void main (String args[]) {

try{

 BufferedReader stdin =new BufferedReader(new InputStreamReader(System.in));
 System.out.print("Enter a digit:");
 int a = Integer.parseInt(stdin.readLine());
 System.out.println(++a);

}catch(IOException e){System.out.println(e.getMessage());}
}
}


regards
ali farid
- Original Message -
From: Friendship <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 13, 2000 11:26 PM
Subject: Help, why wrong ?!


> Hi, guru,
>
> I am very new to java.
> I want read a int from keyboard and plus one, then
> display it.
> But why it doesn't work?
> Help me please!!
>
> Thanks & Have nice weekend!!
>
>
>
> import java.io.*;
> public class ReadKeyB {
>
> public static void main (String args[]) {
>
>
> DataInputStream in = new DataInputStream(System.in);
> int s ;
>
> try {
>   s = in.readInt();
>   int myint = intValueOf(s);
>   myint++;
>   System.out.println(myint);
>  }
>
>
> catch (Exception e) {
>System.out.println("Error: " + e.toString());
>  }
>
>
> }
>
> }
>
> __
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]




New to Java

2002-01-16 Thread Ali Ghaharbeighi

Hi,

I am very new to Java and would like to learn this language.
Using both windows and Linux versions.
Is there a place on the web that guide me through learning
it step by step. By simple examples and so on.

Please advice,

Regards,

Ali


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]