Tuesday, 10 October 2017

java function calculate sum


class sum
{
     int num1,num2;
    int add()
{
     num1=19;
     num2=20;
      return num1+num2;
}}
   public class function
  {
     public static void main(String args[])
{
       sum p = new sum();
     System.out.println("The sum is ="+p.add());
}}

0 comments:

Post a Comment