Skip to content

Instantly share code, notes, and snippets.

@tobiballof
Created September 22, 2016 07:57
Show Gist options
  • Save tobiballof/614c4825c06b2f5410678304c2b83607 to your computer and use it in GitHub Desktop.
Save tobiballof/614c4825c06b2f5410678304c2b83607 to your computer and use it in GitHub Desktop.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package vereine;
/**
*
* @author Tobi
*/
public class Mitglied {
String name;
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package vereine;
import java.util.ArrayList;
/**
*
* @author Tobi
*/
public class Verein {
String vName;
ArrayList<Mitglied> name = new ArrayList<Mitglied>();
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package vereine;
/**
*
* @author Tobi
*/
public class Vereine {
public static void main(String[] args) {
Verein verein1 = new Verein();
Mitglied mitglied1 = new Mitglied();
Mitglied mitglied2 = new Mitglied();
mitglied1.name = "Olga";
mitglied2.name = "Frank";
verein1.vName ="DaddelClub";
verein1.name.add(mitglied1);
verein1.name.add(mitglied2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment