iT邦幫忙

2021 iThome 鐵人賽

DAY 4
0
自我挑戰組

從零開始學Java系列 第 4

Day4 Hello World! &基本介紹

起初接觸Java的時候,正式開始學習寫程式的時候,第一支程式通常是『HelloWorld』,學習過Java的人對這支程式肯定都印象深刻,接下來我會使用這支程式介紹許多Java的小東西!
https://ithelp.ithome.com.tw/upload/images/20210916/20140457z8Xdsn84Lw.jpg
●[ ]:array ●String:字串陣列●(String[] args):input●args:變數
● The method println() is used to output a string to the screen.
● System.out refers to the standard output device, say the screen.
● Every statement ends with a semicolon (;). 
● class: declare a new class followed a distinct class name.
Class取名開頭必須大寫字母! EX:Student,Order,School…
● public: can be accessed by any other class.
● static: can be called without having any object.
● void: do not return a value.

Table of special characters
https://ithelp.ithome.com.tw/upload/images/20210916/20140457cycJ8KTybv.jpg

Bugs
有三種常見的Bugs:
●Compile-time error: most of them are syntax errors. (語法錯誤)
● Runtime error: occurs when Java program runs, e.g. 1/0. (通常用以表示有東西不存在)
● Logic error: introduced by implementing the functional requirement incorrectly.(邏輯錯誤)


上一篇
Day3 JDK、JRE 和 JVM 的區別
下一篇
Day5 Data types, Variables, and Operators (Ⅰ)
系列文
從零開始學Java30

尚未有邦友留言

立即登入留言