What is the difference of JAVA and JDK API is?

The difference between JAVA and JDK API are:

1, Java is like a house, API is like the relationship between land, JDK like developers.

2, JDK the API is to JAVA, mutual survival, and independently, only by working together can create value.

First, the name:

1、JDK:Java Development Kit 。

2、API:Application Programming Interface 。

Second, the concept:

1, Java: a can write object-oriented programming language, cross-platform applications. Java technology has excellent versatility, efficiency, platform portability, and security, is widely used in PC, data center, game consoles, scientific supercomputers, cell phones and the Internet, also has the world's largest developer of professional community.

2、JDK:

(1), JDK is a Sun Microsystems product for Java developers is. JDK itself uses the Java language. Simply put JDK is for developers using the SDK, which provides a Java development environment and runtime environment. SDK is a Software Development Kit generally refers to software development kit may include libraries, compilers and so on.

(2) since the introduction of Java, JDK has become the most widely used Java SDK (Software development kit).

3、API:

(1), API is an application programming interface.

(2), are some of the pre-defined function, the purpose is based on a software or hardware capabilities to provide application developers with access to a set of routines, but without having to access the source code, or to understand the details of the inner workings.

Third, the role of:

1、JDK:

(1), jdk Java language is the Software Development Kit. Mainly for java applications on mobile devices, embedded devices.

(2), JDK is the core of Java, including Java runtime environment (Java Runtime Envirnment), a bunch of Java tools and Java-based libraries (rt.jar).

(3), no matter what the essence of Java application servers are built a version of the JDK.

2、API:

(1), when running a Java program, a virtual machine class loader file used by Java API class files.

(2), ava API also contribute in terms of Java security model. When the method of the Java API do anything potentially dangerous (such as local disk write operation) before, it will be checked by a query whether it has been authorized access controller. Access controller is a class that is used to perform stack tests, has decided whether to allow certain operations.

Fourth, other:

1、JDK:

(1), including the basic components included in JDK: javac - the compiler, jar - packing tools, javadoc - documentation generator, jdb - debugger- troubleshooting tools, java - java program after running the compiler, appletviewer- browser applet , Javap-Java disassembler, Jconsole: Java system debugging and monitoring tools.

(2), jdk1.8 new features:

(1), Java 8 interface to allow us to add a non-abstract method implementation, just use the default keywords.

(2), the new lambda expressions

(3), provides interface functions

(4), Java 8 allows you to use keywords to :: transfer method or constructor references

(5), we can access the local variables of the outer layer directly in lambda expressions.

2, API: composition and characteristics:

(1), all loaded class files (including from within the application and extracted from the Java API) and all have been loaded dynamic link library (containing native methods) make up the entire program that runs on the Java Virtual Machine. 

(2), in a platform capable of supporting Java program before, you must explicitly implement the API function on this particular platform.

(3) for access to local resources on the host, Java API calls a native method.

(4) Since Java API class file calls the local method, Java programs do not need to call them up.

(5), by this method, Java API class file for the underlying host provides a platform-independent, Java programs standard interface.

(6), for Java programs, regardless of the internal platform, Java API will have the same performance and predictable behavior.

(7), precisely because in each specific host platform explicitly implements the Java Virtual Machine and the Java API, therefore, Java program itself can become a platform-independent program of.

Guess you like

Origin www.cnblogs.com/pangjh/p/11525519.html