// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
public class PA16 {
    public static void addOneToAll(int[] a) {
        for(int i = 0; i < a.length; i++) {
            a[i] = a[i] + 1;
        }
    }
    public static void main(String[] args) {
        int[] a = new int[1000];
        for(int i = 0; i < a.length; i++) {
            a[i] = i + 1;
        }
        addOneToAll(a);
        System.out.println(a[0] + " " + a[a.length - 1]);
    }
}
