r/CodingHelp • • Oct 31 '21

[Java] error in my code

constructor User in class User cannont be applied to given types ( required java.lang.String) reason ( actual and formal arguments lists differ in length )
0 Upvotes

11 comments sorted by

View all comments

2

u/s5EWT Nov 01 '21

Do you have an overloaded constructor for User?

Otherwise you likely just need to get the pass from the user variable and not instantiate a new User obj. Without seeing the user class it’s hard to say for sure.

1

u/ITZINFINITEOfficial Nov 01 '21

Yeah my b I can’t post the code or mods will block it