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.

29th Nov 2017, 11:02 PM
kenneth Stanley
kenneth Stanley - avatar
3 odpowiedzi
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.
1st Dec 2017, 11:52 AM
John
John - avatar
0
https://code.sololearn.com/c64KSv5EK1fr/?ref=app this is what I wrote as an example.
1st Dec 2017, 11:58 AM
John
John - avatar
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.
1st Dec 2017, 12:00 PM
John
John - avatar