Home  >  Article  >  Java  >  Is java a c language?

Is java a c language?

青灯夜游
青灯夜游Original
2019-11-15 17:07:0510047browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:Is java case insensitive?Next article:Is java case insensitive?