Introduction to java for the first time # 2

Development flow

1, source code creation Write the grammar defined by java in the source code

  1. Compile The source code is compiled and converted to bytecode.

3, execution After compiling, execute bytecode in software called an interpreter.

Important consciousness

Describe accurately

Enter alphanumeric characters basically in half-width characters Don't mistake similar letters

From outside to inside, not from top to bottom

I don't know if it's closed in parentheses, so be aware of opening and closing immediately.

Write easy-to-read code

Try to write source code that is easy for anyone to read


Indent to make it easier to see the multiple structure of blocks

public class Main {
  public static void main(String[] args) {
    System.out.println("hello, world!");


You can add commentary to the source code Ignored at runtime when the program is compiled

/*Comment body (multiple lines allowed)*/

//Comment body (until the end of the line)


Variables are like boxes that you prepare inside your computer to store data.

Variable declaration statement

Type variable name;
public class Main {
	public static void main(String[] args) {
	    int age;
	    age = 30;

How to declare a constant

final type constant name = initial value;
public class Main {
	public static void main(String[] args) {
	    final double TAX = 1.08;
	    int fax = 5;
		System.out.println(fax * TAX +"Ten thousand yen");

Recommended Posts

Introduction to java for the first time # 2
Learning for the first time java [Introduction]
Learn for the first time java # 3 expressions and operators
Learning memo when learning Java for the first time (personal learning memo)
How to study kotlin for the first time ~ Part 2 ~
How to study kotlin for the first time ~ Part 1 ~
Spring Boot for the first time
Spring AOP for the first time
[Java] Introduction to Java
Introduction to java
About the procedure for java to work
[Java] How to set the Date time to 00:00:00
Output of the book "Introduction to Java"
Introduction to java command
I tried using Docker for the first time
Walls hit by Rspec for the first time
Android Studio development for the first time (for beginners)
[Java] (for MacOS) How to set the classpath
I tried touching Docker for the first time
Use Java external library for the time being
An introduction to Groovy for tedious Java engineers
[Introduction to Java] Basics of java arithmetic (for beginners)
Run Dataflow, Java, streaming for the time being
[First Java] Make something that works with Intellij for the time being
The story of releasing the Android app to the Play Store for the first time.
[Socket communication (Java)] Impressions of implementing Socket communication in practice for the first time
Programming for the first time in my life Java 1st Hello World
Introduction to programming for college students (updated from time to time)
Impressions and doubts about using java for the first time in Android Studio
[Java] Introduction to lambda expressions
Oreore certificate https (2020/12/19) for the first time with nginx
I want you to use Scala as Better Java for the time being
Introduction to Java for beginners Basic knowledge of Java language ①
[Java] Introduction to Stream API
What Java engineers need to prepare for the Java 11 release
Command to try using Docker for the time being
[Introduction to rock-paper-scissors games] Java
Input to the Java console
[Android studio / Java] What you don't understand when you touch it for the first time
[Rails] I tried using the button_to method for the first time
[Java] Use ResolverStyle.LENIENT to handle the date and time nicely
A memorandum to reach the itchy place for Java Gold
Reintroduction to Java for Humanities 0: Understanding the Act of Programming
Modeling a Digimon with DDD for the first time Part 1
[Introduction to Java] About lambda expressions
[java8] To understand the Stream API
[Introduction to Java] About Stream API
Introduction to Functional Programming (Java, Javascript)
Initial introduction to Mac (Java engineer)
Welcome to the Java Library Swamp! !!
Introduction to Programming for College Students: Introduction
The road from JavaScript to Java
An introduction to Java that conveys the C language to those who have been doing it for a long time
A summary of what Java programmers find when reading Kotlin source for the first time
Think when Rails (turbolinks) doesn't load the page for the first time
[Java] Introduction
kotlin & Java: How to hide the toolbar only for specific fragments
How to check for the contents of a java fixed-length string
[DL4J] Java deep learning for the first time (handwriting recognition using a fully connected neural network)
[Introduction] Installation of Docker Desktop for Mac for the first time and setup of virtual environment construction of CentOS
[Introduction] Setting up GridDB Community Edition in the CentOS container of Docker Desktop for the first time