Hi all,

I have an input text file with content bellow :

ABC = Any Body Cus
JS = Java Script
Ser = Serverlet
Ars = Arsenal

Any Body Cus = Any Body Cus
Java Script = Java Script
Serverlet = Serverlet

Arsenal = Arsenal
so i want to split text from file and receive result with content bellow :
ABC,JS,Ser,Ars and add them on an array [ABC,JS,Ser,Ars]

so how can i do ?
thank !

iterate over the lines in the file, read them, one by one. then, use the split method with '=' as separator, you'll get an array of Strings. trim the first element of that array, and add it to your new list or array.