View Single Post
  #5 (permalink)  
Old 09-13-2008, 10:08 AM
fishtoprecords's Avatar
fishtoprecords fishtoprecords is offline
Senior Member
 
Join Date: Jun 2008
Posts: 522
fishtoprecords is on a distinguished road
Quote:
Originally Posted by CirKuT View Post
Code:
private static Account[] accounts = new Account[MAX_ACCOUNTS]; public coldbeveragejava.Account getAcount(int accountID) { System.out.println("Entering AccountRepository getAcount"); return accounts[accountID]; } private static Account[] accounts = new Account[MAX_ACCOUNTS]; public coldbeveragejava.Account getAcount(int accountID) { if (accountID == accounts); return accounts[accountID]; }//This gives me a message stating incomparable types
Why are you using different definitions for "Account" in your code?
You have
private static Account[] accounts ...
and
public coldbeveragejava.Account getAcount(...

Why "coldbeveragejava.Account" in one place and "Account" in another? Use the same words, exactly in both places
Reply With Quote