feat: add an isEmpty() method that allows you to check whether the colle

This commit is contained in:
Гаджикурбанов Темирлан
2026-08-24 00:52:09 +03:00
parent 9e8fc5effb
commit e7db5fee4d
@@ -77,6 +77,10 @@ public class MyLinkedList<T> implements MyList<T>
public int size() {
return size;
}
public boolean isEmpty()
{
return size == 0;
}
public String toString() {
Object[] res = new Object[size];
int index = 0;