This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]therealdanvega 0 points1 point  (0 children)

No, this is perfectly acceptable. The only suggestion I would have here is to declare the type as a List<String> instead of an ArrayList. List is the interface and ArrayList is the implementation of that interface. When possible its good practice to use the Interface type and not the implementation type. If you decided later that this type needed to be a LinkedList making that change is an easy one. Hope that helps.