Java Learning First---get started with Java

Source: Internet
Author: User
Tags java keywords

This is my first blog post, will also write their own study of Java process, some knowledge points, experience and so on, so as to encourage themselves to adhere to the study!

Now I'm starting my career in Java: "Personal download of JDK version is jdk-8u5-windows-x64"

1. Post-installation directory:

->source Code: Installing this option will install the source code of all Java core class libraries

->bin: This path holds the various tool commands of the JDK, commonly used Javac, Java and other commands.

->DB: This path is the path where Java db is installed "db (data base, database) is organized according to a data model and holds the data collection in level two storage. 】

->include: Some platform-specific header files.

->JRE: The JRE environment required to run the Java program is installed under this path.

->lib: The actual execution of the JDK Tools command is stored under this path. (contains compilation and operation required: Dt.jar and Tools.jar)

->javafx-src.zip: This compressed file holds the source code for all of the core class libraries in Java FX.

->src.zip: The compressed file contains the source code for all Java core class libraries.

Descriptive documents such as->README and license.

2. Settings for Environment variables:

->path=d:\java\jdk1.8.0_05\bin (Location of the JDK installation->JDK tool)

->classpath: The version above JDK 1.5 can no longer be set up separately, of course, if the settings are not error, but it should be noted that plus (.) represents the current directory.

The general setting is: D:\Java\jdk1.8.0_05\bin\dt.jar;.;D: \ Java\jdk1.8.0_05\bin\tools.jar "

3.Java source file naming conventions and case-sensitive issues

Class name. Java, about the class name, if there is no public modifier in the file, you can match the name of the rule arbitrarily, but if a public class is defined in the source file,

Then it must be the same as the defined class name; only one public class can be defined in the source file.

->java is strictly case-sensitive: Java keywords are all lowercase and do not need to capitalize any letters.

->main: Compiled class class, if need to let it run must exist inside main, this main method must use public and static to decorate,

The return value of the method must be declared with void, and the parameter type can only be an array of strings, not other forms of arguments, and the public and static positions can be interchanged,

The rest of the position is fixed.

-Eg:public static void Main (string[] args)

4.Java garbage collection mechanism

The memory allocation and recycling of Java programs is done automatically by the JRE in the background, and the JRE reclaims memory space that is no longer used, which is the memory space in the JVM heap memory.

Garbage collection is a dynamic storage management technology that automatically frees objects that are no longer referenced by the program, and a specific garbage collection algorithm is used to automate the recovery of memory resources.

Of course, garbage collection is not precisely controlled, meaning that it will be executed automatically when the CPU is idle or the memory is about to run out.

The JVM now has a variety of garbage collection mechanisms.

Because it is not much to read, write something to feel important! Another point of knowledge comes from---"Crazy Java Handout (3rd edition)"

Java Learning First---get started with Java

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.