I have a dataframe say having C0,C1,C2 and so on as columns.

I need to create interaction variables to be taken as input for my program. 

For eg - 

I need to create I1 as concatenation of C0,C3,C5

Similarly, I2  = concat(C4,C5)

and so on .. 

How can I achieve this in my Java code for concatenation of any columns given input by the user.