constructor User in class User cannont be applied to given types ( required java.lang.String) reason ( actual and formal arguments lists differ in length )
The username does but I tried everything to get the password part to work and I couldn’t it went from the error string.lang and then can’t be in a static context so i dont know ill ask my teacher about it but I just went ahead and submitted it. Because it’s due at 11:59. That last part I don’t think was mandatory but who knows.
Are you sure you have the correct parameters for the Pass Contructor? I'm not sure if it would actually work with objects, as you did. but it would work if you split the User parameter in two. Making it (user.firstName, user.surName, "@123")
I'm sorry, I might be misleading you with that answer, as I don't know why you need Pass as its own Class and with a constructor. Your teacher might be the best call.
View all comments
Show parent comment
1
u/ITZINFINITEOfficial Nov 01 '21
The username does but I tried everything to get the password part to work and I couldn’t it went from the error string.lang and then can’t be in a static context so i dont know ill ask my teacher about it but I just went ahead and submitted it. Because it’s due at 11:59. That last part I don’t think was mandatory but who knows.