We have to create a private getAllUsers method in the MainModel class (Step 6). But then we have to also declare this method in the Model interface (Step 8). How can that be? The interface methods cannot be private, and a method implemented from an interface cannot have a different access modifier. I've asked about this on Discord as well and have been told you can't do this with access modifiers.
The private modifier on the getAllUsers method is causing a problem
Resolved
Comments (3)
- Popular
- New
- Old
You must be signed in to leave a comment
Lisa
16 January 2022, 20:20solution
They're not talking about the getAllUsers method when it comes to adding a method to the interface. You should consider one of the methods from step 1.
+4
Justin Smith
16 January 2022, 21:44
Ugh, I already added that one. Thank you. It would be helpful if instead of saying "the previous method" (which is not even true, getAllUsers is the previous method) they would just specify the name of the method they want copied over. I know I'm far from the only one to complain about the instructions, but still... I had this task done all day and didn't even know it because I was confused by the instructions.
0
Lisa
16 January 2022, 23:04
I complain all the time already for two. That's why it's nice to hear from others who are not better off either 😜🤪
0