Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Objects Creating the MVP Conference Registration Assistant

Conference registration challenge task

for the conference registration challenge task I can't seem to find the answer.

1 Answer

Raffael Dettling
Raffael Dettling
32,999 Points

The loops look like this. And the problem is you need single qoutes ' to signal that the letter are chars and not strings :)

if(lastName.charAt(0) >= 'A' && lastName.charAt(0) <= 'M'){
        return 1;
    }else if(lastName.charAt(0) >= 'N' && lastName.charAt(0) <= 'Z'){
        return 2;
    }
Raffael Dettling
Raffael Dettling
32,999 Points

I checked it you cant use double quotes " ^^

Thank you it worked