Good morning I'm working with java for a class project and I have a question.
I have a class named Modul and another one of class Alumne.
In the Alumne class I have declared an Array attribute of type Modul:
ArrayList <Modul> modul = new ArrayList <Modul>();
because a student can have several modules.
the fact is that in the mainClass when I want I want to save the modules asked with the scanner nose how to specify that it is modul type what to save.
For example when we ask a question and the attribute to save is of type String we keep it like this:% variable = EjemploScanner.next();
That's what I do not know how to do so instead of telling you that the data to be saved will be modul type in String or int accounts etc.