이 블로그 검색

2023년 7월 28일 금요일

Java's Primitive Data Types and Reference Data Types

Primitive Types

  • There are a total of 8 primitive types predefined and provided.
  • As they have default values, they do not have Null.
  • They are stored in the stack memory, which is the space for storing actual values.
  • String is an object and not a primitive type.

Reference Types

  • All types except primitive types are reference types.
  • Null, which represents an empty object, exists in reference types.
  • The space for storing the address value of the location where the value is stored is in the heap memory.
  • There are no syntax errors, but runtime errors occur when using Null for objects or arrays, leading to a NullPointException. Therefore, variables should be assigned values.

댓글 없음:

댓글 쓰기

Logic Gate Truth Tables & Definitions

Logic Gate Truth Tables Java Code !A // NOT A&B // AND ~(A&B) // NAND A|B // OR ~(A|B) // XOR A^B // XOR ~(A^B) // XNOR ~A // Inve...