4 ms·
> Do experienced java programming concatenate a bunch of strings together, or is there a format method? Yeah, I've seen this a lot. IIRC, String concatenations
by quacker 13y ago
> Do experienced java programming concatenate a bunch of strings together, or is there a format method?
Yeah, I've seen this a lot. IIRC, String concatenations with the + operator are compiled to use a StringBuffer for efficiency. There is also a static method String.format that works with C-like format strings.
> Is anyone actually using Arraylist over Generics?
I'm not sure exactly what you mean by this. The following is pretty standard Java, if you want a list of Strings.
List<String> list = new ArrayList<String>();
The following gives you a list of Objects (the base type for all objects in Java):
List list = new ArrayList();
If you put Strings into this list, then they come out as Objects. You'll have to cast to use them as Strings or the compiler complains.