Sachin Tripathi wrote:So tell me how you represent an object, in java codes.
Hai Thompson wrote:
No, System.out is not a primitive. It is a reference to an object, more precisely a PrintStream object which is created to work as the “standard output” for the runtime you happen to be using. You can find more details by looking in the API documentation for System.out and other links there.
Hai Thompson wrote:. . . I think "out is not an object but primitive variables", . . .
Knute Snortum wrote:I think you've got it, except that out is a static reference to the type PrintStream which contains the method println(), but you can think of it as a reference to an object -- just that it's a reference to a class. There is no instance.
Knute Snortum wrote:I got it wrong. Sorry for the confusion.