Top.Mail.Ru
December 9th, 2002 - Java developers — LiveJournal
? ?

Java developers

December 9th, 2002
Image

10:28 pm - Imagemarauder65ix

The compiler says that this method is missing a return statement, but I thought I had a return statement already in the method?

 		public Object putDataIntoBucket( int targetKey, Object targetData )
		{
			for (int i = 0; i <= SLOTS_PER_BUCKET; i++)
			{
				if (i == targetKey)
				{
					Object oldData = bucket[i].data;
					bucket[i].data = targetData;
					return oldData;
				}
				else return null;
			}
		}
Powered by LiveJournal.com
Image