Java Interview Questions
Java Interview Questions 1. What are the differences between C++ and Java? C++ is not platform-independent; the principle behind C++ programming is “write once, compile anywhere.” In contrast, because the byte code generated by the Java compiler is platform-independent, it can run on any machine, Java programs are written once and run everywhere. · Languages Compatibility. C++ is a programming language that is based on the C programming language . Most other high-level languages are compatible with C++. Most of the languages of Java are incompatible. Java is comparable to those of C and C++. · Interaction with the library. It can access the native system libraries directly in C++. As a result, it’s better for programming at the system level. Java’s native libraries do not provide direct call support. You can use Java Native Interface or access the libraries. · Characteristics. C++ distinguishes it...