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);
}
}
$ javac MyApp.java
$ java MyApp
Hello Wor
ld! Again
Recommended Posts