What is the difference between Java and C language?
1.C language is a process-oriented language, execution efficiency is high; Java is an object-oriented language with less execution efficiency than C language.
2. Pointers, Java No pointers, and pointer-type C language The greatest advantage, he can give users access to almost all of the computer's memory resources and other parts of the resources.
3. Automatic memory management, Java has garbage collection mechanism, all the objects in the Java program are built on the memory stack with the new operation, theJava automatic does not need the memory reclamation operation, does not require the programmer to delete. in C language, memory resources must be freed by program Shell.
4. Data types and classes. Java is a fully object-oriented language, and all functions and variables must be part of the class. In addition to the basic data types (Boolean, char, Byte, short, int, long, float, double, and so on, the rest is the class object, including the array.
5. Multiple inheritance: C + + supports multiple inheritance, a feature of C + + that allows a class to be derived from a multi-parent class. Although multiple inheritance is powerful, it is complex to use and can cause a lot of trouble, and it is not easy for the compiler to implement it. Java does not support multiple inheritance, but allows a class to inherit multiple interfaces (interfaces), realize the function of C + + multiple inheritance, and avoid many defects of C + +.
Java------Frequently asked questions of the face