I have a question is there a way or a script to depend a string?
I will give a example of what i want:
String oldstring = "123";
String newstring = depend(oldstring);
I want my var newstring to equal 12.
What do I need to do?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want to take parts of a string, use stringName.substring() : http://www.roseindia.net/java/beginners/SubstringExample.shtml
If you want to get an integer from a string, use Integer.parseInt(string) : http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29
“I want my var newstring to equal 12. What do I need to do?” No vars in java btw.