当前位置:网站首页>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
边栏推荐
- Test questions and some space wars
- Huawei mobile ADB devices connection device is empty
- Super easy to use asynchronous export function of Excel
- How to achieve centralized management, flexible and efficient CI / CD online seminar highlights sharing
- ThreadLocal test multithreaded variable instance
- Node configuration environment CMD does not take effect
- Cefsharp stores cookies and reads cookies
- C-11 problem h: treasure chest 2
- Quartz. Www. 18fu Used in net core
- Batch download of files ---- compressed and then downloaded
猜你喜欢
Supersocket is Use in net5 - concept
Comprehensive calculation of employee information
超好用的Excel异步导出功能
Supersocket is Use in net5 - startup
Idea view history [file history and project history]
Code forces round # 784 (DIV. 4) solution (First AK CF (XD)
Codeforces Round #784 (Div. 4)题解 (第一次AK cf (XD
Database - MySQL -- Navicat import SQL error 1067 - invalid default value for 'paydate‘
Test questions and some space wars
Using swagger in. Net5
随机推荐
Code forces round # 784 (DIV. 4) solution (First AK CF (XD)
Codeforces Round #784 (Div. 4)题解 (第一次AK cf (XD
Experiment 6 input / output stream
7-1 introduction to finance
JS calculates the display date according to the time
MySQL grouping query rules
Téléchargement en vrac de fichiers - téléchargement après compression
Use of ADB command [1]
Using jsonserialize to realize data type conversion gracefully
Eight elder brothers chronicle [4]
Problem C: realize Joseph Ring with linked list
JS recursive tree structure calculates the number of leaf nodes of each node and outputs it
2022 团体程序设计天梯赛 模拟赛 L1-7 矩阵列平移 (20 分)
批量下載文件----壓縮後再下載
ThreadLocal test multithreaded variable instance
月薪10k-20k都无法回答的事务问题,你会吗?
TCP three handshakes and four waves
Quartz. Www. 18fu Used in net core
L3-011 direct attack Huanglong (30 points)
JS implementation of new