2015211233090 Java programming 1st weekly learning summary and javaio stream learning Summary

Source: Internet
Author: User

2015211233090 Java programming 1st weekly learning summary and javaio stream learning Summary

1. Learning Summary

A preliminary understanding of Object-Oriented Programming

Use eclipse to associate git to manage code

Java

2. Written Assignments

P: Why can java programs run across platforms? What are the steps for executing a java program? (Please write in your own language)

Q: Because java programs run on java virtual machines and each platform has a corresponding Virtual Machine (JVM), java programs can run across platforms.

The compiler first converts the source code to the. class file, and then runs the. class file in the java interpreter.

 

P: What is jdk? What are the differences between jdk, jre, and jvm?

Q: jdk is a java Development Kit, jre is the runtime environment of java programs, jvm is a java Vm, and jdk contains the jre environment.

 

P: in the java HelloWorld command, what does the HelloWorld parameter mean?

Q: Let the jvm find a file named HelloWorld. class and load the HelloWorld class

 

P: How to set the path variable?

Q: To build a java environment, we need to add the bin directory under the jdk installation directory to the existing PATH variable, the bin directory contains frequently-used executable files such as javac, java, and javadoc. After setting the PATH variable, You can execute tools such as javac and java in any directory.

 

P: What is the difference between compiling a program in java and running a program in C language and the generated intermediate file and target file?

Q: java source code file:. java

Java bytecode file (directly interpreted and executed by JVM):. class

C source code file:. cpp. c

C intermediate file (Compiled binary file):. obj

C target file (Executable File):. exe (windows). out (default Suffix in linux, which can be changed at will theoretically)

 

P: Which development platforms are available in Java?

Q: eclipse

Myeclipse

Netbeans

Jbuilder

P: What is the difference between Oracle JDK and Open JDK?

Q: different authorization protocols: OpenJDK uses GPL V2 protocol for release, while sun jdk uses JRL for release. Although both protocols are open-source, the difference in use is that GPL V2 is allowed for commercial use, while JRL only allows individuals

Research use.

OpenJDK does not contain the Deployment function. The deployed functions include Browser Plugin, Java Web Start, and Java Control Panel. These functions cannot be found in OpenJDK.


OpenJDK source code is incomplete: it is easy to think that in OpenJDK using the GPL protocol, some source code of sun jdk cannot be open to OpenJDK due to property rights issues, the most important part is the code of the SNMP part of the optional component in JMX. Therefore, the Open Source Code cannot be used as plug for OpenJDK compilation. You can also choose not to use plug. While Icedtea developed the source code (OpenJDK6) of the same function for these incomplete parts, promoting OpenJDK to be more complete.

Some source code should be replaced with open-source code: Due to property rights issues, many source codes that are not SUN's property rights are replaced with open-source code with the same functions, such as the font raster engine, instead of Free Type.

OpenIDK only contains the most streamlined JDK: OpenJDK does not contain other software packages, such as Rhino Java db jaxp ......, In addition, software packages that can be separated are separated as much as possible, but most of them are free software. You can download and add them by yourself.

Cannot use the Java trademark: This is easy to understand. On the machine where OpenJDK is installed, enter "java-version" to show OpenJDK, but if OpenJDK is installed with the Icedtea patch, java is displayed.

This part is from https://www.zhihu.com/question/19646618/answer/40621705

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.