Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Java class variable number
- Driver d1 = new Driver("John", "01/01/1980");
- List<Driver> drivers = new ArrayList<Driver>();
- drivers.add(new Driver(..));
- drivers.add(new Driver(..));
- ArrayList<Driver> drivers = new ArrayList<Driver>();
- Driver d1 = new Driver("John", "01/01/1980");
- drivers.add(d1);
- Driver[] drivers = {new Driver("John", "01/01/1980"),
- new Driver("Smith", "02/02/1990")};
- // or
- Driver[] drivers = new Driver[2];
- drivers[0] = new Driver("John", "01/01/1980");
- drivers[1] = new Driver("Smith", "02/02/1990");
- List<Driver> drivers = new ArrayList<Driver>();
- drivers.add(new Driver("John", "01/01/1980"));
- drivers.add(new Driver("Smith", "02/02/1990"));
- // ...
Add Comment
Please, Sign In to add comment