Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the basic concept of JAVA

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "what is the basic concept of JAVA", the content is simple and easy to understand, the organization is clear, I hope to help you solve doubts, let Xiaobian lead you to study and learn "what is the basic concept of JAVA" this article.

History of Java Development

Father of Java: James Gao Jialin

2. Key time points: Java(1.0) was released in 1996, Java(5.0) was promoted in 2004, Java(8.0) was the most widely used in 2014, and Java(16.0) was used this time in 2021.

Java Cross-Platform

Principle: Different platforms have corresponding Java virtual machines (JVM)

II. JRE and JDK

JRE is an environment for running Java programs, including JVM and core libraries

JDK is a Java development kit that contains JRE and development tools (including compilation tool javac.exe and runtime tool java.exe)

That is, JDK includes JRE and development tools. JRE includes JVM and core class libraries that can cross platforms.

Third, download JDK

official website link

Baidu cloud link, extraction code: bjcp

After installation, there are several sections under the directory:

Common DOS commands

win+R into CMD, cut disk, dir, cd, cls, exit command

V. Configure Path environment variable

This is to add the bin directory to the system variable, jdk16 after all configured

VI. FIRST PROCEDURE

1. Create a HelloWorld.java file

2. Use Notepad to open HelloWorld.java file and write content

public class HelloWorld {public static void main(String[] args){System.out.println("HelloWorld");}}

3.After jdk11, java HelloWorld.java can be used directly. If the program will output Chinese, add-encoding UTF-8 after it.

6. bug(beetle)

For example, common problems such as Chinese and English, capitalization, file and class names, missing brackets, etc.

VII. Notepad

This is convenient to display line numbers, and it is uneasy to use IDE later.

VIII. Notes

Single line://

Multiple lines: /* /

Documents:/** */

IX. Keywords

Features: Lowercase, editor has color identification for keywords

X. Constant

Note: Character constants are single quotes, string constants are double quotes, and empty constants cannot be output directly.

XI. Data types

The smallest unit of memory in a computer is a byte, and a byte (B) consists of eight bits (b).

XII. Variables

Format: Data Type Variable Type = Variable Value

Note: add L after long type, add F after float type

XIII. Identifiers

Format: 1. Consists of numbers, letters and $;2. Cannot start with numbers;3. Cannot be keywords;4. Case sensitive.

Methods, variable conventions (small hump nomenclature): 1. When the identifier is a word, the first letter is lowercase;2. When the identifier is composed of multiple words, the first letter of the first word is lowercase, and the first letters of the other words are capitalized.

Class conventions (big hump nomenclature): 1. Capitalize the first letter when the identifier is a single word;2. Capitalize the first letter of each word when the identifier is a combination of multiple words.

XIV. Type conversion

1. Automatic type conversion: assigning a value or variable representing a small data range to another variable representing a large data range

2. Coercive type conversion: a value or variable representing a large data range is assigned to another variable representing a small data range (plus a cast)

The above is "JAVA basic concept is what" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report