A typical C program would be compiled, assembled, linked and loaded. I know that Java works with the JVM and produces byte code. Would it be possible to connect both “object files” using the linker? For example, a C program and a C++ program can be used together by playing with the linker and linking both object files.
Can the same be done between C and Java?
You can’t directly link compiled C code with compiled Java code.
You can call compiled C or C++ code from Java using Java Native Interface (JNI):