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