aspose file tools*
The moose likes Beginning Java and the fly likes int array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "int array" Watch "int array" New topic
Author

int array

kofi ofei
Ranch Hand

Joined: May 22, 2005
Posts: 39
it compiles but when i run it nothing seems to be happening

class IntArray{
private native int sumArray(int arr[]);
public static void main(String args[]){
IntArray p = new IntArray();
int arr[] = new int [10];
for (int i = 0; i < 10; i++)
arr[i] = i;
int sum = p.sumArray(arr);
System.out.println("sum = " + sum);
}
static {
System.loadLibrary("MyImpOfIntArray");
}
}
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

sumArray method doesn't do anything, so nothing will happen.

Moving to Java In General (Beginner) forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: int array
 
Similar Threads
JNI: I can't run the HelloWorld program successfully.
References
hashcode & equals - how to check array
Java generic error
passing back array from c to java