Q1. I have a stringA="A/SG/Fall"
I want to split it to three string, which are A, SG, Fall,
How do split it out?
A. Use String Tokenizer
StringTokenizer st=new StringTokenizer(stringA,"/");
While(st.hasMoreTokens())
{
String token=st.nextToken() //Here you will get A, sg, fall as separated tokens
}
Q2. I have another stringB="this is my problem!"
I want to get the last three characters for the StringB, I know in ASP can be use Len Function, but don't know in JSP how to do it?
A2. stringB.substring(stringB.length()-3,stringB.length());
Nothing impossible in
Java. Just explore it.
:-)
-SaTyA-