Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Check if an array is full and add to array

807607Nov 25 2006 — edited Dec 1 2006
Hi i am fairly new to java and need some help with a couple of problems.
I have an array and i want to do a boolean check to see if that array is full, i have used a method name arrayIsFull() so i can call this method inside another method which will add an object to the array. this will explain it better i have an array (with a maximum called max which is set by the user) called array
public void add(person p)
	{
		call isfull to see if array is full
               if not full add person p to array
				
       }    
public boolean isFull()
	{
            check if array is full 
	}
I hope that makes sense!! Can any body help me?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 29 2006
Added on Nov 25 2006
30 comments
4,659 views