int e=0;
int Compatability=0;
int numOfDisagreements=0;
int tsize=likes.size()+dislikes.size();
int numOfCommonLikes=0;
int numOfCommonDislikes=0;
if (user.likes.get(e).equals(Stranger.likes.get(e))){
if ((Stranger.howDoYouLike(likes.get(e)))== 1 && user.howDoYouLike(likes.get(e))==1)
{
numOfCommonLikes=numOfCommonLikes+1; }
}
else if (user.dislikes.get(e).equals(Stranger.dislikes.get(e))){
if ((Stranger.howDoYouLike(dislikes.get(e)))== -1 && user.howDoYouLike(likes.get(e))==-1)
{
numOfCommonDislikes=numOfCommonDislikes+1;
}
else
{
numOfDisagreements=numOfDisagreements+1;
}
e++ ;
}
Compatability=(numOfCommonLikes+ numOfCommonDislikes)- numOfDisagreements;
return Compatability;
}
Am getting a nullpointer error, i dont know what that means but can someone tell me what is wrong with this code please, i am looking real hard