Insert k copies of each element in ArrayList This method takes an ArrayList&lt;String&gt; s and int k , then creates k copies of each element.

public static void copyStrings(ArrayList&lt;String&gt; s, int k) {
        if (k &lt;= 0) {
            s.clear();
        } else {
            int limit = s.size();
            for(int i = 0; i &lt; limit; i++) {
                for( int j = 0; j &lt; k; j++) {
                    s.add(s.get(i));
                }    
            }
            for( int i = 0; i &lt; limit; i++) {
                s.remove(0);
            }
    }
}
You have double the indenting that you should inside your method.

Rather than calling s.get(i) every time, store it in a variable and use from that instead. Incidentally, this means that you can use an advanced for instead of a simple one.

I'd recommend renaming limit to originalSize, so that it's clear what it is.

s isn't descriptive. Why not call it source? Ditto with k -- why not call it copies?

Why are you making it specific to Strings, when it's almost just a find-and-replace away from being a generic method? If you make it generic, it'll work with any type, not just the one.

Aside from that, there's not much. Your code is pretty short, and there isn't much to say. Here's your code with these tips applied:

public static &lt;E&gt; void copyStrings(ArrayList&lt;E&gt; source, int copies) {
    if (copies &lt;= 0) {
        source.clear();
    } else {
        int limit = source.size();
        for(E element : source) {
            for( int j = 0; j &lt; copies; j++) {
                source.add(element);
            }    
        }
        for( int i = 0; i &lt; limit; i++) {
            source.remove(0);
        }
    }
}