To do what you are trying to do, you need to think in a different way. In the expression builder, you can only use one line of Java code at a time. This makes it trickier to work with, but there are always workarounds (a Routine is a good workaround). What you are trying to build is a String array. This might be tricky (impossible I would suggest) in the way you are trying it. But you can use a Routine for this OR use an ArrayList to achieve this. Talend actually implements a List data type which is essentially the java.util.List class.

Another thing I will suggest is that if you are new to Talend, maybe ask us about your requirement. A lot of the time there is a different way of solving a problem in Talend that new users do not realise. It might be that you are making this a little more complicated than it needs to be.

To do what you are trying to do, you need to think in a different way. In the expression builder, you can only use one line of Java code at a time. This makes it trickier to work with, but there are always workarounds (a Routine is a good workaround). What you are trying to build is a String array. This might be tricky (impossible I would suggest) in the way you are trying it. But you can use a Routine for this OR use an ArrayList to achieve this. Talend actually implements a List data type which is essentially the java.util.List class.

Another thing I will suggest is that if you are new to Talend, maybe ask us about your requirement. A lot of the time there is a different way of solving a problem in Talend that new users do not realise. It might be that you are making this a little more complicated than it needs to be.