If in java filed value is coming like 1123456@lopoa format.
So My question I am trying to take the value before @.
So according to java what to do to implement this logic?
If in java filed value is coming like 1123456@lopoa format.
So My question I am trying to take the value before @.
So according to java what to do to implement this logic?
You should use split(String) method of String class.
Following is working code:
public static void main (String[] args)
{
String val = "1123456@lopoa";
String[] vals = val.split("@");
System.out.println(vals[0]);
}
Output:
1123456
See it working here