0
I want to change a string object wait a method .who can i do it in java??
3 Respuestas
+ 1
Hello Peyman
Can you explain your question? What do you want to do with your String? I don't know what you mean with "wait".
+ 1
when i sent a string type to a method it dosent change in main method.why??strings isnt refrence??
0
A string is immutable. If you change it you create a new string object. So your method need to return this new string object.