Tuesday, 10 October 2017

java function calculate product


class product
{
     int num1,num2;
    int pro()
{
     num1=9;
     num2=2;
      return num1*num2;
}}
   public class function2
  {
     public static void main(String args[])
{
       product p = new product();
     System.out.println("The product is ="+p.pro());
}}

0 comments:

Post a Comment