Reputation: 489
That is a phone interview question.
Assume you have a C++ code, you want to implement the code by using Java rather than rewriting the code. How would you solve that?
I cannot figure out this question. Can anyone told me the solution?(is it possible by import some package or java library?)
Thanks
Upvotes: 1
Views: 1089
Reputation: 1330
Using Java Native Interface (JNI), you can use a method written in c++(or some other language) in your java code
Upvotes: 2