Hi all im working on a program and have got the error "char cannot be dereferenced". The for loop iterates through the array "people" and sends a message to each one using the method "getPerson()". This method gets a single character from a StringBuilder array. The method is declared as the return type char so i used .toString to try to change it into a string as I got a different error before. I am a novice in java so im not even sure im going about this theright way! I hope someone can help because I just cant see a way forward!
Thankyou in advance for anyone willing to help.
for (int i = 0; i < people.length; i++) { aHouse.getPerson(); { if (aHouse.getPerson().toString() == "Y") { return "Yes"; } } }