/ W3SCHOOLS

W3schools - Syntax

이 페이지는 다음에 대한 공부 기록입니다
Lecture에서 배웠던 내용을 복습하며 작성했습니다

찾으시는 정보가 있으시다면
주제별reference를 이용하시거나
우측 상단에 있는 검색기능을 이용해주세요

Java syntax

A class should always start with un uppercase first letter

Java is case-sensitive : “MyClass” ≠ “myclass”

The main() Method

Any code inside the main() method will be executed

Every program must contain the main() method

Java Comments

Make it more readable

Or prevent execution when testing alternative code

Single-line comments

  • // start with two forward slashes

    • Any text between // and the end of the line, is ignored by Java

Multi-line comments

  • /_ start with, and ends with _/
    • between /_ and _/ is called “comment block”, is ignored by Java