Tuesday, 10 October 2017

java function subtraction of two numbers


class Subtraction
{
     int num1,num2;
    int sub()
{
     num1=120;
     num2=30;
      return num1-num2;
}}
   public class function1
  {
     public static void main(String args[])
{
       Subtraction p = new Subtraction();
     System.out.println("The Subtraction is ="+p.sub());
}}

0 comments:

Post a Comment