lint all files
This commit is contained in:
@@ -59,22 +59,28 @@ boolean iPositive = i>0; //TRUE
|
||||
### Object and Memory Diagrams
|
||||
|
||||
- null = nothing
|
||||
|
||||
```java
|
||||
Account account;
|
||||
```
|
||||
|
||||
- This causes a memory location to be reserved for account.
|
||||
|
||||
```java
|
||||
account = new Account(100);
|
||||
```
|
||||
|
||||
- This causes account to be instantiated with a balance of 100
|
||||
|
||||
```java
|
||||
Account account;
|
||||
account = new Account(250);
|
||||
account = new Account(700);
|
||||
```
|
||||
|
||||
- After declaration and execution of the first assignment, the state of the memory diagram is:
|
||||
- Account => Account (Balance = 250) => Account ~~(Balance 250)~~ (Balance 700).
|
||||
- This is an example of Garbage Collection.
|
||||
- Read up to w5 slide 39.
|
||||
|
||||
Next homework next Wednesday. Based mainly on Homework 1.
|
||||
Next homework next Wednesday. Based mainly on Homework 1.
|
||||
|
Reference in New Issue
Block a user