java - How to add two string array members into one string variable -
i've been trying figure out how add string array member string variable no luck. here code.
mydirstring = mydirstring.trim(); string[] mydirstringparts = mydirstring.split(" +"); mysize = mydirstringparts[0]; mynum = mydirstringparts[1]; total = mydirstringparts[2]; myname = mydirstringparts[3];
basically want mydirstringparts[2];
included myname
.
myname = mydirstringparts[3] + mydirstringparts[2];
will work.
Comments
Post a Comment