Menu
Question Index
...

Write a program to add two numbers.



class AddNumbers
{
    public static void main(String s[])
    {
        System.out.println("Sum of 21 and 18 is " + sum(21, 18));

    }


    public static int sum(int a, int b)
    {
        int result = 0;
        return result;
    }

}

Doubts

Problems

Topic: Basic Arithmetic Operators In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App