I was going through some of the questions online and I came across this code. I couldn't understand the meaning of this particular line of code. Please can anyone explain me the meaning of this line of code.
So, there are two classes Student class and Course class. Each class has its own setters and getters. Now, there is this one output statement which is something like this:
System.out.println("I like " + student2.getCourse().getCourseCode());
**bdw student2 is an object of the Studentclass
The part that i am confused is
student2.getCourse().getCourseCode() It looks like two methods are somehow linked or something. What is the meaning of this line. Any article or suggestions is really appreiciated. Thank you!