Java Learning _ 0 Basic Learning Java Method _ 0 Basic Learning Java Ideas

Source: Internet
Author: User
Tags java se

Before learning Java, a question for a real beginner (that is, learning Java from scratch): What is Java and then how to learn Java? Java is the high-level programming language introduced by Sun Microsystems in 1995, which is divided into Java SE, Java EE, Java ME, Java SE is the foundation of Java, following javase is Javaee,java ME. Javase is the foundation of Java EE, and Servlet and JSP are the foundation of the framework. Database personal advice to learn Oracle, of course, other like Mysql,mssql, can, as long as the one, then learn the others will find are very similar. The other is html,css,javascript,xml, these are javaweb programming to use. Suggested Learning sequence: 1, HTML,CSS,JAVASCRIPT,XML2, JAVASE3, Java EE, including Servlet, JSP, framework as for the learning of the database, before Java, in, after all, suggested before Java, At least before Java EE.
So in the end how to learn Java, especially for the 0 basic beginner, the following is I prepare for everyone of the Java Learning Circuit diagram:

650) this.width=650; "title=" Java Learning Roadmap. jpg "alt=" Java Learning Roadmap "src=" http://s3.51cto.com/wyfs02/M02/6C/D8/ Wkiol1vuoc-sfjh9aak4nty3-ve419.jpg "/>

Java Learning Roadmap


PS: Please follow the priority to learn, ① representative key mastery to skilled, ② representative to master, ③ have a general image on the line, others ask you to say a probably


Object-Oriented preliminary understanding:

Process-oriented transition to object-oriented:
Believe that most friends should be exposed to C language, C language is a representative of the process-oriented language, how to distinguish between object-oriented and process-oriented? Here's an example: we usually play chess games.

650) this.width=650; "style=" Float:none; "title=" 1.jpg "alt=" wkiom1vuof7cpckpaahpklgjbci358.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m02/6c/de/wkiom1vuof7cpckpaahpklgjbci358.jpg "/>

Java Object-oriented


General definition: The object of life is described, through the form of a class, describing the properties and behavior of things. Object-oriented is to look at the problem from the macroscopic perspective, and the process is to analyze the problem from the microcosmic.
Several basic concepts of object-oriented, we need to understand clearly:
1. Object: Anything that people want to study
2. Class: An abstraction of an object of the same or similar nature
3. The state and behavior of the object: data and corresponding actions
4. Structure of classes: Relationship between classes, "general---Specific is a", and "total---part" has a "relationship

Basic object-oriented features:

① Encapsulation (Encapsulation): Hidden object Implementation Details, exposing object functionality through public methods
② polymorphism (polymorphism): Subclass objects can be assigned directly to the parent class, but the runtime shows the behavior characteristics of the subclasses
③ Inheritance (Inheritance): A class that shares the structure and behavior of one or more class definitions, representing a generalization/specialization of hierarchical relationships
④ Abstraction (Abstraction): Ignores aspects of the topic that are not relevant to the current goal in order to pay more attention to the aspects related to the current goal, including process abstraction and data abstraction

Object-oriented approach: ADP
1.OOA (Analysis): Generate system classes and objects that describe what the software is going to do
2.OOD (Design): Ooa refinement, emphasizing the correct and effective construction of complex systems, that is to determine the relationship between classes, the relationship between objects, 3. Class state transition, inter-module dependencies, etc., software how to do
4.OOP (Code): Three standard conditions: 1. Use objects rather than algorithms as basic logic components; 2. Any object needs to be an instance of a Class 3. Class is related to other classes through inheritance relationships


Introduction to the Java language

Approximate history:

Sun's, Java-based cross-platform makes Java popular, and Java is the name because someone likes to drink "Claw Island" coffee, the name of Java came, in China is called "Oracle", and then Sun sold Java to Oracle, So now the Java Exam certification is also held by Oracle (PS: If you are interested to know the Baidu Encyclopedia to look at)

Four technical architectures:

Javase,javaee,javeme (embedded, obsolete), Javacard (Java Platform for smart cards)

The main advantages of Java: Object-oriented, cross-platform, multi-threading, security, simplicity and robustness, and improved interpretation: to compensate for the slow interpretation of language, Java uses precompiled methods to generate byte code, and some Java environments use the JIT compiler to compile bytecode into mechanical code, run directly, Server-side software for repetitive execution can reach C speed

Related noun Explanation:

The JVM Java VM (Java Vittual machine) is an imaginary machine that is implemented by software simulations on the actual computer and is trusted in the Java runtime, enabling Java to execute across platforms, including a set of bytecode instructions, a group of registers, a stack, A garbage collection heap and a storage method domain operating principle: on any platform to the compiler a common interface, the Java source program is compiled by the compiler into bytecode, the bytecode is then interpreted by the virtual machine execution, the virtual machine to each executed byte code to the interpreter, The interpreter is translated into machine code on a particular machine and finally runs on a specific machine.


JRE and JDK

JRE (Java runtime enviroment) Runtime Environment: JVM + Core Class Library
JDK (Java Development Kit) Development toolset: JRE + compiler


Garbage collection mechanism for the JVM (garbage Collection)

The recycled object space is not referenced by any reference, and in general Java is automatically garbage collected
If you want to manually request garbage collection, you can call the System.GC () or Finalize () method recommendations;
It's just a suggestion, and it doesn't exactly control the implementation of the garbage collection mechanism.



Building the development environment

JDK installation: Now the latest is JDK 1.7, interested can go to the official website to download, the author is 1.6, Link: JDK 1.6 download
It's a stupid way to get to the next step.


Configuration of environment variables

Right-click My Computer---> Advanced---> Environment variables
installation directory for JAVA_HOME:JDK
Path: Added in front:%java_home%\bin;! Don't delete the back, or you have something wrong with the computer don't look for me =
Classpath:%java_home%\lib\tools.jar;

650) this.width=650; "style=" Float:none; "title=" 2.jpg "alt=" wkiol1vuoely0qbwaahlnv7_ml8807.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m00/6c/d9/wkiol1vuoely0qbwaahlnv7_ml8807.jpg "/>

Configuration of Java Environment variables



New Java_home

650) this.width=650; "style=" Float:none; "title=" 3.jpg "alt=" wkiom1vuohvgesxiaabykkwxs1e681.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m00/6c/de/wkiom1vuohvgesxiaabykkwxs1e681.jpg "/>

New Java_home



Modifying the PATH variable

650) this.width=650; "style=" Float:none; "title=" 4.jpg "alt=" wkiol1vuofatj0vkaabuzgyrkdy550.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m01/6c/d9/wkiol1vuofatj0vkaabuzgyrkdy550.jpg "/>

Modifying the PATH variable



Configuration of the CLASSPATH variable:

650) this.width=650; "style=" Float:none; "title=" 5.jpg "alt=" wkiol1vuofjx2titaab0s9o_bn0777.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m02/6c/d9/wkiol1vuofjx2titaab0s9o_bn0777.jpg "/>

Configuration of the Lasspath variable



Verify that the environment is configured to complete

Enter Javac in cmd (Win + R), with effect indicating that the configuration environment is complete

650) this.width=650; "style=" Float:none; "title=" 6.jpg "alt=" wkiom1vuoiizyhanaamwlgxgrt8286.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m01/6c/de/wkiom1vuoiizyhanaamwlgxgrt8286.jpg "/>

Verify that the environment is configured to complete



Several packages under the JDK installation directory:

Bin: Tool Command: Javac,java and other JRE: the JRE environment required to run Java
LIB:JDK the actual execution program of the tool instruction Src.zip: The source code of the core class library

The first Hello World explanation:

How the Java code works:

650) this.width=650; "style=" Float:none; "title=" 7 copy. jpg "alt=" wkiol1vuogpcflx-aafje4qanwa720.jpg "src="/http S3.51cto.com/wyfs02/m02/6c/d9/wkiol1vuogpcflx-aafje4qanwa720.jpg "/>

How Java runs code



A few basic DOS instructions

Dir: List directories and folders
CD *.. \: Enter the specified directory
MD: Creating a Directory
RD: Delete directories, but only empty folders can be deleted, which prevents accidental deletion
Del: When deleting files, multiple files can be, *.txt delete all txt files so
Exit: Exit DOS


Code writing:

public class HelloWorld//public is an access modifier, class means declaring a class, HelloWorld class name {public static void main (String args[])//Main method, entry of the program { System.out.println ("Hello world!"); Call the println () method of the Out object of system to print "Hello world!"}} /* Note here that the file name needs to be the same as the public class name, which should be written as: Helloworld.java, otherwise error, missing what; there is only one public class or public excuse for a Java file!! */


Debug Run:
Step 1: Open cmd to the directory where the Java files are stored
Step 2: Compile: Javac Helloworld.java//Do not miss. java; if something goes wrong, modify the wrong file in the Java file and then call Javac compile
Step 3: Run: Java HelloWorld


650) this.width=650; "style=" Float:none; "title=" 8 copy. jpg "alt=" wkiom1vuoi2rmfyeaae-la3ejqw406.jpg "src="/http S3.51cto.com/wyfs02/m02/6c/de/wkiom1vuoi2rmfyeaae-la3ejqw406.jpg "/>

Java Debug Run




In general, Java is a language, learning Java, interest is the best teacher, only hold the mentality of the hot pillow to learn a language, learn a language in depth. If you want to make a Web site out of Java, then you should also learn what it is called the front end, which includes Html,css,div. Deep learning is also very important.
In addition, for the 0 basic Learning Java Beginners Advice in the self-learning, redundant industry people communication is necessary, not only to learn Java the language, more to the full understanding of Java. This is the most convenient and efficient way of learning, in fact, QQ and other online communication tools in close to our distance, can also become our learning to provide a tool. If everyone wants to learn to communicate with Java, the editor can recommend a group, 457036818. It offers the latest Java video tutorials, as well as the most popular Java learning materials, and one of the most recommended books in the English version of Java programming ideas.

This article is from the Java Learning Video tutorial blog, so be sure to keep this source http://10239772.blog.51cto.com/10229772/1651222

Java Learning _ 0 Basic Learning Java Method _ 0 Basic Learning Java Ideas

Related Article

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.