Home >Java >javaTutorial >Is java a c language?
Is java a c language?
Java is not a C language. Since Java can be regarded as developed from C, the syntax of Java and C languages is relatively similar; but there is still a big difference between the two.
The difference between java and c language
1. Different design ideas: C language is a process-oriented language with high execution efficiency; Java is an object-oriented language with high execution efficiency The efficiency is lower than C language;
2. Different versatility: C language cannot be cross-platform; Java can be directly transplanted across platforms, as long as the Java Virtual Machine (JVM) is installed;
3. Different syntax:
(1). Different basic data types:
C language is int short long char float double and there are some special types of structures, pointers, unions, etc., arrays , string;
java is byte int short long float double char boolean, and the number of bits of the basic type of c language is related to the operating system and machine, while java is fixed;
( 2) The file organization method is different: C language puts the declaration of global variables and methods in a file, called a header file, while Java organizes files by classes;
4. Application fields Different:
C language is mainly used for driver development, operating system, kernel development, development of embedded (single chip microcomputer), switches, routers and other network equipment; Java is mainly used for enterprise application development, including server-side development, embedded formal field, big data technology, website field, etc.
The above is the detailed content of Is java a c language?. For more information, please follow other related articles on the PHP Chinese website!