Originally Posted by
ghostheadx
Instance variables- They are what one fills in for the parameters, in a specific instance of an object.
Be careful about what you mean when you say parameter, as that's a specific concept that doesn't necessarily have anything to do with instance variables. Recommended reading:
Instance variable - Wikipedia, the free encyclopedia
Originally Posted by
ghostheadx
Encapsulation- when a variable or data is hidden from the other classes (i.e. private int John); it sort of stops certain parts of the code from being edited by other users, making the fields private
encapsulation would be different from information hiding because information hiding is making certain variable non-accessible by a class's client classes. I don't really get the difference that well.
Encapsulation and information hiding are related, but it's probably inaccurate to call them the same thing. Think of encapsulation as a way to *abstract* the behavior of your code. That might be similar to how cars abstract the internal working of the engine to a few basic functions: going faster, slowing down, maybe shifting gears. You don't need to know what's going on under the hood to use those functions. A more programmatic example might be using an ArrayList: you don't need to know what's going on inside the class to use its get() and add() functions. That's encapsulation.
Conversely, information hiding is when you purposely *hide* the way your code works. Your car might have some systems that limit your top speed. And you can't directly reassign the internal array that ArrayList uses, as that would break the encapsulation of the class.
Originally Posted by
ghostheadx
As for public static final- I think that means a class that can never be edited anywhere in the code, no matter what. I'm pretty sure the data is still usable by other classes, which makes it different from encapsulation or information hiding. It's also different from private variables because it can still be accessed.
Take the keywords one at a time. What does it mean for a class (or a variable, or a method) to be public? What does it mean for a class/variable/method to be static? What about final? Your description only mentions classes and seems to only be talking about the final keyword. And what do you mean when you say a class can never be edited in the code? Try to be more specific with your language.
Also, it might help to put together some example programs that test all of your theories.
Originally Posted by
ghostheadx
I THINK that the client of a class (i.e. class a) would be when class b, per-say, uses information from class a and/or edits or changes information from class a. In that case, class b is one of class a's clients.
Without any more information, a client could be quite a few things.