I have 3 sql tables: **professors(prof_id, name)**, **professors_courses(prof_id, course_id)** and **courses(course_id, title)**.
**professors_courses** is the bridge table between professors and courses.
In *CourseAssignments.java* I search which courses belong to professor x, after user enters a professor "name".
Method returns the course titles in a String array, that belong to professor x. I have problems with the array only.
In "professors" table we have prof_id: 5, name: John;
In professors_courses we have prof_id: 5, course_id: 1
prof_id: 5, course_id: 9
In "courses" table we have course_id: 1, title: French
course_id: 9, title: Spanish
User enters: "John"
In ArrayList "results" I store:
prof_id: 5, course_id: 1 and prof_id: 5, course_id: 9
So it's similar with the bridge table, but only contains the info regarding "John".
In String cs I want to store all the courses of John