当前位置:网站首页>What to pay attention to when writing the first code
What to pay attention to when writing the first code
2022-04-23 03:28:00 【Aiyou coffee】
public class HelloWorld{
public static void main (String [] args){
System.out.println(" Welcome to my blog !");
}
This is the first code I typed , Don't forget to type the code, and there are other precautions
One .public static void main (string [] args) It is our Java Entry to the application
Two .public statia void main It can't be changed
3、 ... and .main Method parameters String []args There are several ways to write .String[]args,String args[],String[]a. These are also main Parameters of
Four .System.out.println This part is the output to the console
5、 ... and . One Java If there is... In the source file public Embellished class class , Then there is only one public Modified class , And the name of the source code should be the same as public The modified class name is consistent , Don't be different .
6、 ... and . One Java There can be more than one... In the source file class, without public Embellished class Class time , You don't have to care so much about its file name , In any one class Any name is OK .
7、 ... and . To write Java Code time , Every sentence of code should be written with ; To end .
8、 ... and . To write Java When coding, symbols must exist in pairs, such as {}
Well, the above is what you should pay attention to when typing the first code , Remember that some are not something you should pay attention to when you first type code, but something you need to remember in your later coding career .
That's all for today , Bye, everybody
版权声明
本文为[Aiyou coffee]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220619009545.html
边栏推荐
- JS inheritance
- MySQL keyword group_ Concat, combined connection query
- ThreadLocal test multithreaded variable instance
- Cefsharp stores cookies and reads cookies
- 第四次作业
- Punch in: 4.22 C language chapter - (1) first knowledge of C language - (11) pointer
- C-11 problem I: find balloon
- 【微服务】(十)—— 统一网关Gateway
- A comprehensive understanding of static code analysis
- QT learning summary
猜你喜欢

L3-011 direct attack Huanglong (30 points)

Using swagger in. Net5

Visual programming - Experiment 1

Section 2 map and structure in Chapter 6

QT learning summary

Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)

Visual programming - Experiment 2

A comprehensive understanding of static code analysis

Unity knowledge points (ugui)

JS - accuracy issues
随机推荐
Chapter 7 of C language programming (fifth edition of Tan Haoqiang) analysis and answer of modular programming exercises with functions
Development record of primary sensitive word detection
String input problem
Experiment 6 input / output stream
Why is bi so important to enterprises?
Unity Basics
The fourth operation
Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)
Seminar playback video: how to improve Jenkins' ability to become a real Devops platform
Visual programming - drawing assignment
Experiment 5 components and event handling
"Visual programming" test paper
场景题:A系统如何使用B系统的页面
第四次作业
通过 zxing 生成二维码
Problem C: realize Joseph Ring with linked list
L3-011 direct attack Huanglong (30 points)
Oracle query foreign keys contain comma separated data
Utgard connection opcserver reported an error caused by: org jinterop. dcom. common. JIRuntimeException: Access is denied. [0x800
Codeforces round 784 (Div. 4) (AK CF (XD) for the first time)