Skip to content

Commit

Permalink
Done2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hot00Tea committed Feb 3, 2025
1 parent 7078a0e commit 116e8f3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/main/java/core/basesyntax/impl/StorageImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,10 @@

public class StorageImpl<K, V> implements Storage<K, V> {
private static final int MAX_SIZE = 10;
private K[] keys;
private V[] values;
private K[] keys = (K[]) new Object[MAX_SIZE];
private V[] values = (V[]) new Object[MAX_SIZE];
private int size = 0;

public StorageImpl() {
keys = (K[]) new Object[MAX_SIZE];
values = (V[]) new Object[MAX_SIZE];
}

@Override
public void put(K key, V value) {
for (int i = 0; i < size; i++) {
Expand Down

0 comments on commit 116e8f3

Please sign in to comment.