I have a string i want to split it into half?
String Data = "This is a string"
This is an example string. In the real case i will not know what is inside the string, how long it is etc
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.
Also, remember that Strings are immutable, you can’t just call
data.subString(data.length()/2);and expect thatdatawill be changed. You have to assign the returned String to some variable (as in my example).