Newbie here. Sorry if this is silly.
I am getting 'Not a statement, ; expected error' for the second constructor method below.
Can't figure the problem.
class Knapsack {
public int size;
public String[] items;
public Knapsack(int size){
size = 5;
}
public Knapsack(String[] items){
items[] = {"doer", "kicker", "pusher"};
}
public String getItem(int i) {
return items[i];
}
public boolean isFull(int size) {
if (size >= 7) {
return true;
}
return false;
}
}