Kaydell Leavitt wrote:An object is what's created anytime that you use the "new" keyword. You declare classes, using the "class" keyword and then you create objects from classes with the "new" keyword.
A context is a particular place in your code, such as the context of being within a certain method. There are contexts where you can refer to your object's instance variable.
Here is an example program that create an object of the class Dog. Notice that there are two main contexts here: 1) from within the main() method, you are in a static context. 2) in the other parts of this code, for example in the Constructor and in the toString() method, you are running in a context where the instance variables "name", "height" and "weight" are all available. In the context of the constructor notice that there are two things named "name" and two things named "height" and "weight". To keep the compiler straight in this context I've used the "this" keyword when I wanted to refer to the instance variable and just used the parameter name when I wanted to use the parameter.
Thank you Mr. Kaydell Leavitt
I got the idea, in case of
Servlet we use ServletContext, so in this case what is the meaning the object and context