не могу понять что сделать с removeNotes
package com.javarush.task.task17.task1703;
import java.util.ArrayList;
import java.util.List;
/*
Синхронизированные заметки
*/
public class Solution {
public static void main(String[] args) {
}
public static class Note {
public final List<String> notes = new ArrayList<String>();
public void addNote(int index, String note) {
System.out.println("Сейчас будет добавлена заметка [" + note + "] На позицию " + index);
synchronized (notes){
notes.add(index, note);}
System.out.println("Уже добавлена заметка [" + note + "]");
}
public void removeNote(int index) {
System.out.println("Сейчас будет удалена заметка с позиции " + index);
String note = notes.remove(index);
synchronized (notes.remove(index)){}
System.out.println("Уже удалена заметка [" + note + "] с позиции " + index);
}
}
}