FUNCTIONS

12. Write a Java method that accepts three integers and returns true if one is the middle point between the other two integers, otherwise false

            class Integer
            {
                boolean  AcceptInt(int num,int num1,int num2)
                 {
                      if(num1>num && num1<num2)
                       {
                          System.out.println("True");
                           return true;
                        }
                      else 
                      {
                         System.out.println("False");
                           return false;
                        }
                  }
            }
            class main
            {
              public static void main(String st[])
               {
                 Integer obj=new Integer();
                        obj.AcceptInt(23,45,90);
              }
            }
            
        

OUTPUT

          True