Java) JDK / JVM / Runtime Data Areas
Java) JDK / JVM / Runtime Data Areas
This post was migrated from Tistory. You can find the original here.
What the JDK is made of
JDK: the development kit, which includes Java itself
JRE: the Java runtime environment
How it runs
Java is compiled into bytecode by javac, but the JVM then runs that bytecode through an interpreter. So Java is a compiled language that also carries the traits of an interpreted one.
JVM
Runtime Data Areas
Variables
Constant: final
Literal: something that is a value in and of itself
Character: char, ’‘
String: String, ”“
- ASCII
- a 7-bit code that covers 128 character combinations
- Unicode
- uses 16 bits — can represent up to 65,536 characters
- UTF-8
- one of the encodings built on Unicode
- uses 1 byte for letters/digits/symbols, and 3 bytes for Korean and Chinese characters
- uses anywhere from 1 to 4 bytes to encode a single Unicode character
Type conversions
- Number to character:
number + '0'-> character - Character to number:
character - '0'-> number - Convert to string:
variable + ""-> string - String to number
Integer.parseInt("string")Double.parseDouble("string")
- String to character
"string".charAt(idx)
This post is licensed under CC BY-NC 4.0 by the author.




