[英]how to use java to implement C++ code
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. 假设您有C ++代码,则想通过使用Java而不是重写代码来实现代码。 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?) 有人可以告诉我解决方案吗?(可以通过导入一些包或java库吗?)
Thanks 谢谢
Using Java Native Interface (JNI), you can use a method written in c++(or some other language) in your java code 使用Java本机接口(JNI),您可以在Java代码中使用以c ++(或其他某种语言)编写的方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.