title: Confused about Instance variables, creating new objects and methods?
body: <p>So I've started dipping my hands in Java on Udacity, and recently i came across this question which I need help with. link: <a href="https://www.udacity.com/course/viewer#!/c-cs046/l-183784769/e-186954461/m-188821863" rel="nofollow">https://www.udacity.com/course/viewer#!/c-cs046/l-183784769/e-186954461/m-188821863</a></p>
  
  <p><strong>Question</strong></p>
  
  <p>Okay, I'm confused and need help.</p>
  
  <p>So far I "think" we've learnt is that in java programming, we create classes, in those classes we create objects(?) and create methods to use these objects and we use variables to store these objects. Please correct me If I wrong so far...</p>
  
  <p>I understand that instance variables are those variables that all methods in that class can access. 
  So in this case: <code>private String name;</code> <code>private String friends;</code> --What do these instance variable store in them, is it the your name and friends name??</p>
  
  <p>Public interface are basically the method head/title(?) - In this case this was: <code>public void addFriend(Person friend)</code>
  <strong>a1)</strong> So here for the word "addFriend", did we declare this somewhere, because how does the computer know what that even means?</p>
  
  <p><strong>b1)</strong> in the arguments for the addFriend method, what does (Person friend) mean and how did we declare/get it? the word friend in the arguments (Person friend), the word friend can't be the instance variable because the instance variable we created was "friends" not "friend", correct?</p>
  
  <p><strong>A2)</strong> for the friend.name, is the "friend" the object? <strong>B2)</strong> and I'm assuming ".name" is the instance variable? <strong>C1)</strong> to assign variables to objects do we always put the object and then .variableName?</p>
  
  <p>Finally as a separate question: how do you figure out what the method for add friend method should we, I'm talking about the process/concept i.e do we look at what the object is and then figure out what to put in the method arguments???</p>
  
  <p>Thanks for your help in advance and please excuse my noob-e-ness :)</p>