IntelliJ Hints break code?
Hello. Apologies if this is actually not a bug. I'll try to be as clear as possible.
I created a Class for a simple "bank account creation" excercise. I'm creating an overloaded Constructor within that Class that should assign some default values to 2 fields in case they are not defined in the Constructor upon creating the object, and then assign the rest of the values to it's corresponding fields as defined in the Constructor.
Problem is, when I start typing what would be the "default values" for the fields "accountNumber" and "balance" it automatically assigns what I type as default values for the wrong fields, and it doesn't even seem to detect that it's, for example, assigning a type double value to a field that's specifically defined as type String (in the image you can see it's assigning 100 to the email field and it is not underlining it in red).
Is this a bug? How can I have control over what field it's assigning a value to?

Please sign in to leave a comment.
Your class has overloaded constructors and the IDE displays the hints for the second one first. Once you continue after the third argument, it will switch to another constructor and will suggest the parameters according to that signature:
View | Parameter Info will show which options are available when typing the arguments.
Hello! Thanks for the input, but it's not doing that either.
Or actually, it is, but wrong fields remain selected. See it changed from email to phoneNumber despite me telling it I will be passing phoneNumber, and consequentially doesn't switch to the correct one, which should be balance.
EDIT: I fixed it, but still wonder if it's some kind of bug.
I noticed that the Constructor I was creating was trying to "copy" the format of the main one above (that is, what field comes first, what second, etc.).
I had to re-arrange things in the rest of the overloaded Constructors to match things to the first one, and so the error was fixed.