The text book has it mentioned as:
System.out -> Class
Println -> Method
But, I disagree.
I think it's:
System -> Class
Out -> Method
Now, according to my logic, should Println be a method inside the method (Out)?
What is the correct concept here?
The text book has it mentioned as:
System.out -> Class
Println -> Method
But, I disagree.
I think it's:
System -> Class
Out -> Method
Now, according to my logic, should Println be a method inside the method (Out)?
What is the correct concept here?
System.out isn't a class or a method, it's a static field on the System class that is a reference to an instance of a class (PrintStream). println is an instance method of PrintStream (or more completely, println is the common name shared by a group of instance methods that are overloaded with different arguments).
System is a class. Out is an object (public static final PrintStream out). println and print are methods. Trust the textbook.
Methods cannot contain other methods, plus "out" never has any parentheses or takes any arguments, so "out" cannot be a method.