This was written for Day 1 in Java class. So the organization might be a little messy...Package: A collection of classes. It also creates a directory
int, double, float, String, boolean, literalsStorage: Stored in the stack area (JVM)Object representations of data.Storage: Memory address is stored i
Fields: Properties or characteristics of an object.Example for Human: age, height, weight, eyeColor, etc.Example for Dog: breed, numberOfLegs, etc.Exa
The new keyword calls the constructor to set the initial fields for an instance.When an instance is made, in the stack area, the instance’s name is st
void → returns nothingint → returns an intdouble → returns a doubleString → returns a Stringint\[] → returns an array with the data type intJust like
Instance Members → non-static membersInstance variables and methods belong to individual instances of a class. Each object has its own set of instance
Static Final Fields: Initialized when declared.Instance Final Fields: Initialized in the constructor.Final fields can be initialized during the object
Definition: Packages function like directories. They help organize classes and avoid naming conflicts.Class Uniqueness: Classes with the same name are
Inheritance allows one class (child or subclass) to use the properties and methods of its parent class (superclass). This greatly enhances code reusab
Just like primitive types, class instances can also be typecast in Java, particularly between classes that declared an inheritance relationship (exten