#Information about the system class
1 messages · Page 1 of 1 (latest)
<@&987246399047479336> please have a look, thanks.
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
it's a field that gets populated by the JVM
since that's the part which is responsible for talking to the operating system
Ok so it's not actually an object it's a field confused why I'm seeing that it's an object with methods but fields don't have methods
it is an object
and a field
field is a property of a class, it can be an object or a primitive
So like
System class
Out field
Out object
Print method
Println method
Printf method
primitives don't have methods, objects do
out is a static field of class System which has type PrintStream
and the PrintStream class has all those methods
What does has a type mean?
it means what kind of class does a variable or a field belong to
classes are blueprints for objects
Yes
you can create onstances of them
Yes
like for example "foo" is a object of type String
Yes
public static final String foo = "foo";
here you declare a field foo with type String which refers a string with value "foo"
Alright thanks for explaining
So I got
System class
PrintStream type = out obj = PrintStream
Then print, println, printf methods
what do you mean by "PrintStream type = out"
kinda
out is a field that points to an object
and that object is of type PrintStream
Could you show me in code maybe I'll understand
you can check it out yourself in an IDE
java sources are fully available
just go to the System class
Alright I'll look at it
Thanks for the information closing thread