Hi Vasu,

On Sep 21, 6:40 am, Vasu <[EMAIL PROTECTED]> wrote:
> After incorporating your suggestions (I changed class name also
> appropriately) the code is :
>
> // ICanReadApp.java
>
> import java.lang.System;
> import java.io.DataInputStream;
> import java.io.IOException;
> class ICanReadApp1 {
>  public static void main (String args[]) throws IOException {
>   System.out.print("Enter your name: ");
>   System.out.flush();
>   String name;
>    BufferedReader br = new BufferedReader(new InputStreamReader(in));
>      br.readLine();
>   System.out.println("Your name is: "+name);
>  }
>
> }

You have to:
set ICanReadApp class as public,
initiate variable name .. you've just declared it
use System.in
import java.io.InputStreamReader

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class ICanReadApp1 {

    public static void main(String args[]) throws IOException {
        System.out.print("Enter your name: ");
        System.out.flush();

        BufferedReader br = new BufferedReader(new
InputStreamReader(System.in));
        String name = br.readLine();
        System.out.println("Your name is: " + name);
    }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to