Your Ad Here
Showing posts with label program to add two numbers using function in java. Show all posts
Showing posts with label program to add two numbers using function in java. Show all posts

Friday, 6 January 2012

# Write a program to add two numbers using function in java


class add
          {
            void add1 (int x,int y)
            {
                        int c=x+y;
                        System.out.println("The Result is:" +c);
            }
}

class main
{
            public static void main(String args[])
            {
                        add a=new add();
                        a.add1(2,3);
            }
}