Introduction to Java Chapter 1 - Introduction to Java Development

problem solving

1. Fill in the blanks

(p2) The three technology platforms of 1.java are (java SE, java EE, java ME) (standard, enterprise, small)

(p3) 2. The operating environment of the java program is referred to as (JRE) (development environment - JDK)

(p8) 3. To compile a java program, you need to use the ( javac xx.java ) command ( run command - java xx )

(p6) 4.javac.exe and java.exe two executable programs are stored in the ( bin ) directory of the JDK installation directory

(p10) 5. The ( path ) environment variable is used to store the path where the java compilation and execution tools are located, and the ( classpath ) environment variable is used to store the path of the ".class" file to be run by the java virtual machine.

2. Multiple choice questions

(p5) 1. Which of the following options are JDK tools? ( A, B, C, D )

A, java compiler B, java running tool C, java document generator D, java packaging tool

(p1)2.java belongs to which of the following languages? ( high-level language )

(p6) 3. Which of the following types of files can be run in a java virtual machine ( xx.class )

(p13) 4. In the bin directory of jdk ( java interpreter ) java.exe runs the xx.class file

(p10) The installation path of 5.jdk is 'd:\jdk' and the environment variable (class) is set to ( d:\jdk\bin ), then you can run javac and java commands in any window.

 3. Thinking questions

(p2) 1. Briefly describe the characteristics of java?

Features: Simple, safe, and object-oriented because it does not use pointers. Because of cross-platform versatility. Supports multi-threading, and has not yet learned the language that does not support multi-threading.

(p3) 2. Briefly describe the difference between JRE and JDK?

JDK=java compiler+java running tool+java document generation tool+java packaging tool.

JRE=java running tool

(p10) 3. Briefly describe the difference between path and classpath?

path: If the command does not find the javac file in the current directory, the javac file is found through the path of javac in the path environment variable for the command to run.

classpath: When the java virtual machine runs a class, it will look for the class file in the path defined in the classpath environment variable. When the classpath is not set, the java virtual machine will automatically set "." as the current directory.

The run priority of the current directory path and the environment variable path.

(p6) 4. Tell me about your understanding of JVM?

java.exe is a java running tool. It starts a java virtual machine (JVM) process. The java virtual machine is equivalent to a virtual operating system. It is specially responsible for running the bytecode files (.class files) generated by the java compiler.

 4. Programming

Write a helloword.

public class HelloWord{
    public static void main(String args[]){
        System.out.println("hello word!");
    }
}

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325766742&siteId=291194637