Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void info_Prog(Teacher teach[]) {
- System.out.println("Programirane teachers: ");
- boolean foundTeacher = false;
- for (int i = 0; i < teach.length; i++) {
- if (teach[i].getSubject().equals("Programirane")) {
- System.out.println((i + 1) + ". " + teach[i].getName());
- foundTeacher = true;
- }
- }
- if (!foundTeacher) {
- System.out.println("No teachers found.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement