In Java you can make classes inherit properties(methods, variables, etc.) of another class. Classes that inherit properties are called sub classes (child classes) and classes that are inherited from are called superclasses. A subclass can only inherit one superclass.
In the default settings the session id will be displayed in the url. If someone sees the session id, then he can login into your login session using the session id which can be seen through e.g. scanning a wifi network (Wireshark).