Hi,
I created a Item class.It contains constructor,getmethods.Item class contains three attributes 1 String,1 Double and 1 Integer.That's ok.But then in my GUI i created a object array like this.
Item item[]=new Item[4];
then i want to hardcode the values.How to do that?I searched it on web and i did it as they have told.
item[0]=new Item("Shirt",20.00,1);
but it gives error.Why is that?Am i wrong?please help
I created a Item class.It contains constructor,getmethods.Item class contains three attributes 1 String,1 Double and 1 Integer.That's ok.But then in my GUI i created a object array like this.
Item item[]=new Item[4];
then i want to hardcode the values.How to do that?I searched it on web and i did it as they have told.
item[0]=new Item("Shirt",20.00,1);
but it gives error.Why is that?Am i wrong?please help