0
How do you interact a string within a class from the main method?
A group of friends asked me to create a code example for them on this topic as I'm somewhat knowledgeable in their minds. At first I thought no problem but now I realize I have no idea where to begin after setting up the class and main method.
3 Antworten
0
you want to manipulate a string that's in a separate class than the main method? if I understood that properly you should use properties.
0
https://code.sololearn.com/c64KSv5EK1fr/?ref=app this is what I wrote as an example.
0
if that's not what you wanted just make the string static outside the main method then call it in the main method to perform your changes.