Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
@Nate Thank you for you help in understanding the exercise. I see now that it was int all along that they wanted, so I'll atribute those to my Switch Cases (like switch (numNaipe) { case COPAS: return "Copas";) and will work from there. Your Portuguese is really admirable... yes I had that comment in Portuguese wrong - it was late and I was getting very sleepy :) - I will also correct it ofc! Thank you very much for your input, I learned something new today!
As for creating a class just for the logic that seems an interesting idea but I'm just learning to build java classes. Ill keep that idea in mind as I'll progress in my studies! Thanks to both of you for your input!
"You've violated Command-Query Seperation. atomicRed changes the state of the object, and so it really shouldn't return information about the object. It certainly shouldn't appear in the middle of a print a call." - Why is this bad? Does it make the code harder to understand or is prone to bugs?
Uau! I wasn't aware you could insert boolean results with a ? : conditional statement inside the println itself! That was a eye opener! Indeed that code like this is simpler and more clear! Ty, I learned something nice today! ps. - I still didn't learn how to format Strings - i'm doing the Stanford University Course, that's why I only use Concatenation yet. Im sure to use it once I learn more :)