Java Learning 1 (learning various data types)

Purpose of the article

Since I decided to use Java in my business,
to output basic Java usage and organize my knowledge.

MyApp.java


public class MyApp{
  public static void main(String[] args){
  //letter
  char a = 'a';
  //Integer byte short int long
  int x = 10; 
  long y = 5555555555L; //For long type, add L at the end.

  //Floating point number float double
  double d = 23423.344;
  float f = 32.33F;
  //Logical value
  boolean flag = true; //false
  //String
  // \n
  // \t
  // String msg;
  // msg = "Hello World Again!"
  String msg = "Hello Wor\nld! Again";

  System.out.println(msg);
  }
}

Output result


$ javac MyApp.java
$ java MyApp
Hello Wor
ld! Again

Recommended Posts

Java Learning 1 (learning various data types)
[Java] Main data types
Java basic data types
Java learning memo (data type)
Java learning (0)
Basic data types and reference types (Java)
Java basic data types and reference types
For JAVA learning (2018-03-16-01)
java learning day 2
java learning day 1
About Java data types (especially primitive types) and literals
Java learning 2 (learning calculation method)
java learning (conditional expression)
Java learning memo (method)
Java Learning (1)-Hello World
JAVA learning history interface
Java learning memo (basic)
Various threads in java
Java learning memo (interface)
Java random, various processing
Java learning memo (inheritance)
[Java] Variables and types
Generate dummy data for various tests with Faker (java)
Java review ① (development steps, basic grammar, variables, data types)
Java basic learning content 7 (exception)
[Java Bronze learning] Differences between encapsulation, data hiding, and information hiding
JAVA learning history interface inheritance
[Ruby] Various types of each
Java programming (variables and data)
Java basic learning content 5 (modifier)
Books used for learning Java
4th day of java learning
About Java class loader types
Importing Excel data in Java 2
Java learning memo (logical operator)
Import Excel data in Java
Java addition excel data validation
Java learning memo (abstract class)
Java for beginners, data hiding
Importing Excel data in Java 3
Java Basic Learning Content 8 (Java API)
List data structure [Java / Scala]
Java basic learning content 4 (repetition)
[Introduction to Java] Variables and types (variable declaration, initialization, data type)
Java variable declaration, initialization, and types
[Java] Basic types and instruction notes
Deep Learning Java from scratch 6.4 Regularization
Java Primer Series (Variables and Types)
Display Firestore data in RecyclerView [Java]
Java basic learning content 3 (operator / ternary operator)
Java primitive types, reference types, Immutable, Mutable
[Java] Data type / matrix product (AOJ ⑧ Matrix product)
Java learning memo (while statement, do-while statement)
Java array variables are reference types
Java basic learning content 2 (array / ArrayList)
[Android Studio] [Java] Learning memos & links
[Java] Runtime Data Areas of JVM
I tried to summarize Java learning (1)
About Java primitive types and reference types
What I researched about Java learning
[Java] Exception types and basic processing