[Java] Java basics

less than 1 minute read

Introduction

This is my memo

How to output

kane.java


System.out.println()

Can be output by inputting a literal in ()

kane.java


System.out.println("Hello!")

Enclose in “” (double quotation marks) for strings

kane.java


System.out.println("Hello!");

** Firmly attach a semicolon **

System.out.println () is an “instruction” to output (display) the contents of ().

How to use print () and println ()

kane.java


System.out.print("banana");
System.out.println("banana");

print () does not end with a newline, but println () automatically inserts a newline at the end.

At the end

I could write more, but I stopped because my understanding was ambiguous.
Next time I wish I could write the difference between the compiler and the interpreter in my own words ..

Tags:

Updated: