Home  >  Article  >  Java  >  An introductory overview of learning Java from scratch (system)

An introductory overview of learning Java from scratch (system)

php是最好的语言
php是最好的语言Original
2018-08-06 13:51:261324browse

Hello World

Friends who have been following me should know that I have planned to start writing Java-related articles a long time ago, but I have never thought about where to start. Because if it’s too simple, everyone knows it, but if it’s too difficult, you may not have learned it yet. Life is always like this, with contradictions and entanglements always entangled in us. It's useless to think about it and struggle with it. It's better to start from scratch. Let’s go through the road of self-study again, give some direction to those who have no basic knowledge, and review the basics for those who are already working!

Let’s start today’s knowledge!

An introductory overview of learning Java from scratch (system)

1. Basic computer knowledge (related to Java daily programming)

1. Introduction to keyboard shortcuts (universal shortcuts, in Common to any IDE for writing code)

  • Ctrl A Select all

  • ##Ctrl C Copy

  • Ctrl V Paste

  • Ctrl X Cut

  • Ctrl Z Undo

  • Ctrl S Save

2. Common DOS commands

常用DOS命令

2. Java language overview

1. Java language development history

An introductory overview of learning Java from scratch (system)

2. Java language platform version

An introductory overview of learning Java from scratch (system)##3. Java language characteristics

    Simplicity and explanation
  • Object-oriented high performance
  • Distributed processing multi-threading
  • Robustness dynamics
  • Structural neutral security
  • ##Cross-platform (important)
  • What is cross-platform?
  • Applications written in Java language can run on different system platforms

    What is the principle?
  • Only install a Java Virtual Machine (JVM Java Virtual Machine) on the operating system that needs to run Java applications. The JVM is responsible for the running of Java programs in the system

  • 3. JDK related download and installation

JRE (Java Runtime Environment Java Runtime Environment)
  • Includes Java Virtual Machine (JVM Java Virtual Machine) and the core class libraries required for Java programs. If you want to run a developed Java program, you only need to install JRE on your computer
  • JDK (Java Development Kit Java Development Kit)
  • JDK is provided for Java development Those used by developers include Java development tools, including JRE. So after installing the JDK, there is no need to install the JRE separately. The development tools include: compilation tool (javac.exe) packaging tool (jar.exe), etc.
  • To put it simply: the java program developed using JDK is handed over to JRE to run
  • JDK download (Google/Baidu "Java JDK download")
  • JDK installation (foolish installation, just take the next step, the installation path is not required There are Chinese or special symbols such as spaces)
  • 4. Configuration of environment variables

The role of path environment variable configuration
  • The execution of the program requires the use of the external instruction javac, but the javac instruction can only be used in the bin directory under the JDK installation directory, so the program can only be written to the bin directory
  • During the program development process, the source code cannot be written to the JDK installation directory, so the source program needs to be saved to a specified directory (English directory) in any location, so the javac command needs to be available in any directory. Run
  • path environment variable configuration, classpath environment variable configuration (no need to set classpath after Java 1.5 version)
  • path/classpath environment variable For configuration, please Google/Baidu "Java Environment Variable Configuration" and configure according to the first result of the search
  • The difference between path and classpath
  • The path environment variable records executable files, such as .exe files. For executable files, first look for them in the current path. If not found, go to the path configured in the path environment variable to find them
  • The classpath environment variable records the directory where the running file of the Java class is located
  • 5. HelloWorld

Introduction to development tools
  • Eclipse (most people use it, it is recommended to use Eclipse if you have no basic knowledge. Most of the tutorials use this tool, and it is easy to solve errors)
  • MyEclipse
  • STS(Spring Tool Suite)
  • IntelliJ IDEA (trend, it is recommended that those with a development foundation start this directly )

 IntelliJ IDEA

HelloWorld
  • First define a class class class name

  • Add a pair of curly brackets { }

  • # after the class definition ##Add a main method/function between the braces public static void main(String [] args){ }

  • Add a line of output statements between the braces of the main method System.out.println(“hello world”);

An introductory overview of learning Java from scratch (system)

##6. Write at the end, suggestions from people who have experienced it

1. There are too many programming materials now. Just find a reliable learning video. You don’t need to collect so many, you can’t read them at all.

2. When you first start configuring the Java environment, it is recommended to configure according to the learning video. It is easy to make mistakes when reading the configuration.

3. Combining videos and books for learning. You can first follow the videos to learn, and then go through the books to deepen your understanding. You can’t just watch videos to learn, and you can’t just read books.

4. Don’t get too confused. There are many programming problems that you can’t figure out now, that’s okay! Then continue to learn. After learning, you will understand what you couldn't figure out before.

5. Be sure to type more code, and say important things three times: type more, type more, type more.

6. There is no programming that cannot be learned, only one who does not work hard. When I first started learning, I was stuck in the environment matching place for three days, but I finally successfully changed careers. So don’t give up when you first encounter difficulties. Everyone has encountered the problems you encounter, so don’t feel stupid!

Related articles:


Regain the basics of java (1): Summary of java overview

java learning part - css Basic knowledge (1)

The above is the detailed content of An introductory overview of learning Java from scratch (system). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn