The two-month soft-exam study began in everyone's passion. The first step is to learn the j2se of the school horse Soldiers Teachers, the purpose of understanding Java grammar, familiar with the knowledge that has been learned, understanding object-oriented, for the back of the headfirst open, all for learning, examination is a small test in the learning process;
easy to understand:
Installing JDK,JDK is the Java language Software Development Toolkit for Java applications on mobile devices and embedded devices. After the installation is complete in the Bin folder is an executable application, the compiler Javac and running Java are the components of the JDK;
Simple Java learning examples, written in UltraEdit, run and compile Java programs, in the command window with the interface. The first is to run the Java program to do basic setup-configure environment variables.
An environment variable is an object with a specific name in the operating system that contains the information that one or more applications will use. For example, the PATH environment variable in Windows and DOS operating system, when the system is required to run a program without telling it the full path of the program, in addition to the current directory in the search for this program, but also in path specified in the path to find. The user can run the process better by setting the environment variables.
Configuring path and CLASSPATH for environment variables
%path%: The system specifies the search path of the executable file, we will modify the path to the Java program saved as the Bin folder of the JDK.
%classpath%: The function is to specify the class search path, to use the already written class, the premise is to be able to find the class compiled execution;
These two environment variables make the execution of our program simple. We want to compile the file, first to find the compiled tool, through path to set, so that we do not have to enter the implementation of the completion path of the program. To compile these files, you must find the file, Classpath set the path to the search class.
How to set it up:
1. My Computer--right-click Properties-Advanced system settings-such as
2. Click on the environment variable, locate the path variable in the system variable, and if not, add the path manually. The variable value is set to the path of the Jdk,bin folder, separated by semicolons, and the classpath path set to the location where the file is to be run;
The first example of a Java program: HelloWorld;
Since unfamiliar with the structure, debugging several times to write such a simple example;
1. The class name and file name must be identical. Include case;
2. The case of the problem, must pay attention to;
3. Use of curly braces;
4. Strings should be enclosed in double quotation marks;
Summary:
HelloWorld means that the Java learning process has begun, the soft test process has begun, the practical follow the plan to take every step, then the results are predictable. The mentality of learning to put the correct, every step to go the practical.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Forward to Java:helloworld