当前位置:网站首页>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
边栏推荐
- Unity knowledge points (common core classes)
- MySQL installation pit
- Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)
- C-11 problem I: find balloon
- C interface
- 【微服务】(十)—— 统一网关Gateway
- ThreadLocal test multithreaded variable instance
- Iotos IOT middle platform is connected to the access control system of isecure center
- Unity basics 2
- Flink customizes the application of sink side sinkfunction
猜你喜欢

Applet - WXS

Codeforces Round #784 (Div. 4)题解 (第一次AK cf (XD

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

Visual programming - drawing assignment
![Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]](/img/1a/a22b4a35d3c083438d0f766a5ecb08.png)
Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]

A comprehensive understanding of static code analysis

Chapter 9 of C language programming (fifth edition of Tan Haoqiang) analysis and answer of exercises for users to establish their own data types

. net webapi access authorization mechanism and process design (header token + redis)

MySQL query specifies that a row is sorted to the first row

QT dynamic translation of Chinese and English languages
随机推荐
L3-011 direct attack Huanglong (30 points)
Supersocket is Used in net5 - command
Five tips for cross-border e-commerce in 2022
Detailed description of MySQL index [B + tree index, hash index, full-text index, overlay index]
WinForm allows the form form to switch between the front and active states
Generate QR code through zxing
Utgard connection opcserver reported an error caused by: org jinterop. dcom. common. JIRuntimeException: Access is denied. [0x800
There is no index in the database table. When inserting data, SQL statements are used to prevent repeated addition (Reprint)
Punch in: 4.23 C language chapter - (1) first knowledge of C language - (12) structure
Section 1 array and slicing in Chapter 6
Optimization of especially slow startup in idea debugging mode
Visual programming -- how to customize the mouse cursor
Test questions and some space wars
深度学习笔记(二)——激活函数原理与实现
淺學一下I/O流和File類文件操作
ThreadLocal test multithreaded variable instance
你真的懂hashCode和equals吗???
Visual programming - Experiment 2
2022 团体程序设计天梯赛 模拟赛 L2-3 浪漫侧影 (25 分)
Docker pulls MySQL and connects