模拟两个类一个类中有静态的常量,另一个类是常量…
Java代码:
Test类
public class Test {
static {
System.loadLibrary("wechatcore");
}
public static double d1 = 0;
public static double d2 = 0;
//模拟一个函数进行JNI赋值操作...
public static native void t(int n1, int n2);
//这是Java代码...
public static void test(int n1, int n2) {
if (n1 == 1 && n2 == 2) {
Test1 test1=new Test1();
d1 = test1.lat;
d2 = test1.lng;
Log.e("test",d1+"----"+d2);
}
}
}
Test1类
public class Test1 {
<