blob: f8cf647fccd35dc6cce08e969dfade940015fff3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
package com.puppycrawl.tools.checkstyle.checks.coding;
public class InputFinalLocalVariableNativeMethods
{
public native String nativeFoo(int a, int b);
private native double average(int n1, int n2);
static {
System.loadLibrary("foo");
}
public void print () {
String str = nativeFoo(1, 4);
System.identityHashCode(str);
}
public static void main(final String[] args) {
(new InputFinalLocalVariableNativeMethods()).print();
System.identityHashCode("In Java, the average is " +
new InputFinalLocalVariableNativeMethods().average(3, 2));
return;
}
}
|