I have just started to learn java..!! I'm trying to implement some C++ programs in java.. Some of them are working perfectely. But this is the only program which is not working.. It's showing 2 errors at br.readLine().. I don't know what to do.. Kindly please have a look on my program & explain me the error.. Here is the code..

import java.io.*;

class point
{

    public static void main(String[] args) throws Exception
    {
    int x,y;
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    System.out.println("Enter the value for x");
    x=Integer.parseInt(br.readLine);
    System.out.println("Enter the value for y");
    y=Integer.parseInt(br.readLine);
        if(x>0 && y>0)
        {
        System.out.println("The point lies on 1st quadrant");
        }
            else if(x<0 && y>0)
            {
            System.out.println("The point lies on 2nd quadrant");
            }
                else if(x<0 && y<0)
                {
                System.out.println("The point lies on 3rd quadrant");
                }
                    else if(x>0 && y<0)
                    {
                    System.out.println("The point lies on 4th quadrant");
                    }
                        else if(x!=0 && y==0)
                        {
                        System.out.println("The point lies on x-axis");
                        }
                            else if(x==0 && y!=0)
                            {
                            System.out.println("The point lies on y-axis");
                            }
                                else if(x==0 && y==0)
                                {
                                System.out.println("The point lies on origin");
                                }
    }
}

It's showing 2 errors at br.readLine()

Because line 11 and 13 are supposed to be br.readLine() where you have br.readline

Thank u vry much..!! Appreciate yur help..

If that solved yoyur question, please mark this "solved" for our knowledge base.
Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.