title: i want to call a method from another class but in same package or file.how to do this?
body: <p>for ex. i have class A
                 class B
                 class C
  i want to use method defined in class C for objects of class B which is called in Class A.
  how to do this?</p>
  
  <p>have look over program?
  i am getting error at PRint statement?</p>
  
  <pre><code>package com;
  
      public class CreditCardDemo {
  
          public static void main(String[] args)
          {
              CreditCardCompany C=new CreditCardCompany();
  
              customer one=new customer(1 , 11 , 1560);
              customer two =new customer(2,22,3400);
              customer three=new customer(3,33,1600);
              customer four=new customer(4,44,600);
              customer five=new customer(3,33,100);
  
              System.out.println("Payback amount: "+ getPybackAmount(two));
          }
      }
  </code></pre>