> See also:
> - Reference
# Java
> [!NOTE]+ Documentation Yo
> - [w3schools](https://www.w3schools.com/java/default.asp)
> - [Oracle Documentation](https://docs.oracle.com/en/java/javase/19/docs/api/index.html)
> - dead
## Object Oriented Programming
> See also:
> - [[Object Oriented Programming]]
Terminology:
- a
OOP in Python uses the terms methods and attributions to describe a class’s functions and variables respectively.
Because everything is a class in Java, all functions are referred to as methods
---
**Overwriting vs Overloading**
In Java, methods that have the same name but receive different parameters are considered to be distinct. Ex:
```java
public void work() {...}
// vs
public void work(int hours) {...}
```
A
## Variables & Data Structures
**The Eight Primitive Data Types:**
| Data Type | Size | Description |
| ---- | ---- | ---- |
| `byte` | | |
| `short` | | |
| `int` | | |
| `long` | | |
| `float` | | |
| `double` | 8 bytes | Stores fractional numbers (6 to 7 decimal digits) |
| `boolean` | 1 bit | Stores true (1) or false (0) values |
| `char` | 2 bytes | Stores a single character/letter of ASCII values |
**Primitive Data Types:**
1. Byte (1 byte)
2. Short (2 bytes)
3. Int
4. Long
5. Float
6. Double
7. Boolean
8. Char
Reference Data Types:
- Strings
- one of the few immutable
when initializing an array in Java, the number provided represents the # of elements (not the highest index)