Suppose I have a file with content:
I want to declare a variable called science.
I want to declare a variable called commerce.
Now I want to declare variables based on last word of each line in the above file. Eg:-
public static String SCIENCE;
public static String COMMERCE;
How can I achieve this? I think this question tries to do the same thing with bash.
How could it be done in java?