// Collection of code snippets by Arne Vajhøj 
// (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) 
package m2n;

public class TestJ {
    public static void main(String[] args) {
        int a = 123;
        int b = 456;
        int c = TestJNI.add(a, b);
        System.out.println(c);
        //
        int[] six = { 1, 2, 3, 4, 5, 6 };
        int allsix = TestJNI.sum(six);
        System.out.println(allsix);
        //
        String s = "ABC";
        String s2 = TestJNI.dup(s);
        System.out.println(s2);
        //
        int[] iv = new int[1];
        String[] sv = new String[1];
        TestJNI.getOut(iv, sv);
        System.out.println(iv[0] + " " + sv[0]);
        //
        Data1 d1 = TestJNI.getRet();
        System.out.println(d1.getIv() + " " + d1.getSv());
        //
        Data2 d2 = new Data2();
        d2.setIv1(123);
        d2.setSv1("ABC");
        TestJNI.chg(d2);
        System.out.println(d2.getIv2() + " " + d2.getSv2());
    }
}
