In my C# project I have a static List that gets filled immediately when declared.
private static List<String> inputs = new List<String>()
{ "Foo", "Bar", "Foo2", "Bar2"};
How would I do this in Java using the ArrayList?
I need to be able to access the values without creating a instance of the class.
Is it possible?
I don’t understand what you mean by
but the following snippet of code in Java has pretty much the same effect in Java as yours: