From my point, it would be better to group some lines.
Empty lines dont give readability in your case
I can suggest something like:
public void createCoach() {
Coach coach = new Coach();
Scanner scanner = new Scanner(System.in);
System.out.println("Ввeдите фамилию тренера");
coach.setFirstname(scanner.next());
System.out.println("Введите имя тренера");
coach.setLastName(scanner.next());
System.out.println("Введите востраст тренера");
coach.setAge(scanner.nextInt());
System.out.println("Введите пол тренара: MALE или FEMALE");
coach.setSex(Sex.valueOf(scanner.next()));
System.out.println("Введите старну тренера");
coach.setCountry(scanner.next());
System.out.println("Введите стоимость одной тренировки");
coach.setCost();
coachRepository.save(coach);
}
From my point, it would be better to group some lines. Empty lines dont give readability in your case
I can suggest something like: