Java Notes 02 Hello World | JAVA学习笔记 01 小黑框

本文介绍了Java编程中的小黑框程序,包括语法错误、运行时错误和逻辑错误三大类型。同时,讲解了Java中的类、方法和变量基础知识,如类的命名规范,方法用于执行操作,以及使用String变量显示消息。
摘要由CSDN通过智能技术生成

小黑框程序和错误提示

//define a class
public class Welcome {
//define main method
public static void main(String[] args) {
//statement
 ClassBlock System.out.println("Hello World!");
} }
  • There are three types of common error:
    • Syntax Error:Detected by the complier are called syntax or compile errors.

    • Run Time Errror: Cause a program to terminate abnormally.

    • Logic Errors: When a program does not perform the way it was intended to.

Classes
  • Java program must have at least one class.
  • class names start with an uppercase letter.
Methods
  • A collection of statements that performs a sequence of operations to display a message on the console.
  • String argument.
Variables
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值