title: Overloading in same class Java
body: <p>I am trying to understand overloading at the moment and am a bit confused. I understand that when calling the same method, it cannot have the exact same arguments. For instance a method called with 2 int variables and then another with two different int variables. But if I use an int and a float, it would be okay. I know the return type does not matter, but what about it being a public or private method. Would this matter?</p>
  
  <p>For instance, say I call <code>public int name(int x)</code> would I be able to call <code>private int name(int x)</code>? </p>
  
  <p>Am I correct in assuming <code>public double name(String x)</code> would also cause overloading in the class? Also is <code>public int name(int x, String y)</code> valid? Passing a string argument into an int function? Would this cause overloading or an error?</p>
  
  <p>EDIT: Do not believe this question is duplicate, my main question is the difference between the public and private, are they method or different and would it cause overloading. Did not see that addressed in other question.</p>