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 5
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] Data type ①-Basic type
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)
About Java basic data types and reference type memory
Learning Java framework # 1 (Mac version)
Java basic learning content 7 (exception)
[Java Bronze learning] Differences between encapsulation, data hiding, and information hiding
JAVA learning history interface inheritance
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
I investigated Java primitive types
Java learning memo (logical operator)
Import Excel data in Java
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
Various methods of Java String class
Java learning memo (creating an array)
[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]
[Rails] Various ways to delete data
Java basic learning content 3 (operator / ternary operator)
Java primitive types, reference types, Immutable, Mutable
Java basic learning content 9 (lambda expression)
[Java] Data type / matrix product (AOJ ⑧ Matrix product)
Java array variables are reference types
Java basic learning content 2 (array / ArrayList)
[Java] Runtime Data Areas of JVM