java - Convert comma-separated string to list of variables? -


this question has answer here:

for java , in reference question how save each value in array separate variable?

if string value is:

1234,aaa,30 

variables be:

var1=1234 var2=aaa var3=30 

use:

string str = "1234,aaa,30"; string[] variables = str.split(","); string first = variables[0]; string second = variables[1]; string third = variables[2]; 

and should work


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -