Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void add(ClassRoom classroom) {
- if (!rooms.contains(classroom)) {
- rooms.add(classroom);
- }
- else {
- throw new IllegalArgumentException("multiple names: " + classroom.getName());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement