add an element to an array of object : i have a class called "receipt" .. and one of the attributes is  an array of object "item []items;" .. and i have method "addItem" with 3 parameter (string name , int quantity , double price) .. question is how i can add these parameters to the array items[] ?? and i have to check the quantity is more than 0 .. 
 whats the code? 
is my question clear?
Hers is my code

    public boolean addItem(String name, int quantity,double price){
	if(quantity <= 0){
		System.out.println("Item wasnt added");
		return false;}
		else{
			item [nItem++];//here is the problem
		}
		}
