How to add 2 numbers in JAVA?

How to add 2 numbers in JAVA?



class sum
{
        public static void main(String[] args)
        {
                int a=5;
                int b=6;
                int c;
                c=a+b;
                System.out.println(c);
        }
}

Output:
11
How to add 2 numbers in JAVA? How to add 2 numbers in JAVA? Reviewed by Unknown on January 28, 2019 Rating: 5

No comments:

If you have any doubt or query ,comment below:

Programming copyright © 2018-19. Powered by Blogger.