Q:

Convert String to Text (Java Hadoop)

I have the following problem:
I want to split a Text value that I get from a file.
The value format is "12,23"
I want to take the first value in a variable a=12 and the second value in a variable b=23.
I use String.split(","); to do that. The problem is that I want to assign these values in Text variables.
I tried the following and it doesn' t work
Text text=(Text) a; 

A:

Use the constructor Text(String string):
String s = "12,23";
String[] array = s.split(",");
Text t1 = new Text(array[0]);
Text t2 = new Text(array[1]);

