package com.company; import java.io.IOException; public class Main { public static void main(String[] args) throws Throwable { Bank.setName("Сберыч"); // Bank.saveClients(); Bank.loadClients(); // Bank.saveBills(); Bank.loadBills(); Task task = new Task(); task.start(); try { Server server = new Server(); server.Run(); } catch (IOException exception) { System.out.println(exception.getMessage()); } task.interrupt(); task.join(); } } class Task extends Thread { @Override public void run() { while (!isInterrupted()) { Bank.showClientsInfo(); try { Thread.sleep(5000); } catch (InterruptedException exception) { System.out.println(exception.getMessage()); } } } }