I am learning Java on my own, i came a cross this interesting example and i found it difficult to understand it.
What i want to know is, what is this called in Java when you have several classes under the same package all of them are Overlapping. Please take a look at the example below ? Note that none of the classes use implements, interface, abstract, extends etc...
And is it possible to find more of these examples ?
class Flightplan
public class Flightplan {
    String type;
    int seat;
    String from;
    String to;
         // Other local variables, style captain ...
    Person[] passenger;
    int counter = 0;
    Flightplan (String t, int s, String startPlace, String d) {
        type = t;
        seat = s;
        passenger = new Person [s-1]; // kapten tar ett säte 
          // Captain takes a seat
        from = startPlace;
        to = d;
    }
    void book (Person p, String f, String t) {
        if (f.equals(from) && t.equals(to)) {
            passenger[counter] = p;
            to = t;
            counter++;
        }
                else System.out.println(p.name + " try to book a wrong flight !");
    }
    void flyg() {
        System.out.println("On the plane " + this.typ + " reser"); 
        for (int i = 0; i < passenger.length && passenger[i] != null; i++) {
            System.out.println(passenger[i].name + ", ");
        }
        System.out.println("\n");
        from = to;
    }
}
class Person
public class Person {
    String name;
    String from;
    String to;
    String stopover;
    int bags;
    Flightplan flight;
    Person (String n, String f, String m, String t, int v) {
        name = n;
        from = f;
        stopover = m; // Only one stopover is approved, otherwise we would enter this as an array
        to = t;
        bags = v;
    }
    void boardNextLeg(Flightplan plan) {
        flight = plan;
// Function bar for a stopover due. if-kit building
        if (!stopover.equals(null) && flight.from.equals(this.from) && flight.to.equals(this.stopover)) { 
            System.out.print(this.name + " is now in between");
            System.out.println(from + " and " + stopover);
            flight.book(this, from, stopover);
        }
        else if (flight.from.equals(this.from) && flight.to.equals(this.to)) {
            System.out.println(from + " och " + to);
            flight.book(this, from, to);
        }
                else System.out.println(this.name + " could not be booked on a flight");
    }
}
 
     
     
    