[Java] output, variables

Standard output

System.out.println()

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

variable

Variable definition Data type variable name;

String hello;
hello = "Hello World";
System.out.println(hello);

The meaning is the same here as well

String hello = "Hello World";
System.out.println(hello);

Type conversion

** Forced conversion (cast) ** Force type conversion on output

Example: I want to output the calculation result between int types with a decimal point (it is not originally a decimal point)

int num1 = 10;
int num2 = 4;
System.out.println((double)num1 / num2);

Recommended Posts

[Java] output, variables
[WIP] Java variables
About Java log output
Java formatted output [Notes]
[Java] Variables and types
(Note) Java classes / variables / methods
Java programming (variables and data)
Java
Java standard log output sample
About Java class variables class methods
How to use Java variables
Java
Why are class variables needed? [Java]
Java Primer Series (Variables and Types)
[Java] Output by FormatStyle of DateTimeFormatter
[Java] Output multidimensional array / spreadsheet (AOJ⑥ spreadsheet)
[Processing × Java] How to use variables
Mixed Western calendar output in Java
Java array variables are reference types
Log output to file in Java
Output PDF and TIFF with Java 8
How to name variables in Java
[Basic knowledge of Java] Scope of variables
Java local variables are thread safe
Java learning (0)
Studying Java ―― 3
[Java] array
Java protected
[Java] Annotation
[Java] Module
Java starting from beginner, variables and types
Java array
Studying Java ―― 9
Java scratch scratch
Java tips, tips
Java methods
Java method
java (constructor)
Java array
[Java] ArrayDeque
java (override)
java (method)
Java Day 2018
Java string
java (array)
Java static
Java serialization
java beginner 4
JAVA paid
Studying Java ―― 4
Java (set)
java shellsort
[Java] compareTo
Studying Java -5
java reflexes
java (interface)
Java memorandum
Java array
Studying Java ―― 1
[Java] Array
[Java] Polymorphism