Do we ever use strings in public methods?

I thought about using a string during this challenge. I wrote it as follows:

After thinking about it, I went ahead and removed it because I assumed any string functionality would actually be occurring inside ProvideHint() and wouldn’t need any string interaction within the public method, it would simply display the hint (based on what bulls and cows were currently returning true for the player) if called. Was I right to assume this? Should it just be displayed like I have “void DisplayCorrectWord();”?

Following that question, is there ever a time when adding a string to a public method is useful?


I should mention I did this before watching the last two minutes or so of the video hah.

Privacy & Terms