|
|
||
| 1. OOP concepts |
|
|
|
||
|
|
||
| 2. Three Characteristics of a truly OOP environment |
|
|
|
||
|
|
||
| 3. Encapsulation |
|
|
|
||
|
|
||
| 4. Inheritance |
|
|
|
||
|
|
||
| 6. Examples: the Button classes |
|
|
|
|
||
|
|
||
| 7. Variables in java |
|
|
|
||
|
|
||||||||||||
| 8. Boolean |
|
|||||||||||
|
||||||||||||
|
|
||
| 9. Boolean example |
|
|
|
||
|
|
||
| 10. Boolean comments |
|
|
|
||
|
|
||||||||||||
| 11. Characters (char) |
|
|||||||||||
|
||||||||||||
|
|
||
| 12. Char Examples |
|
|
|
||
|
|
||
| 13. Char Notes |
|
|
|
||
|
|
||||||||||||
| 14. byte |
|
|||||||||||
|
||||||||||||
|
|
||||||||||||
| 15. int |
|
|||||||||||
|
||||||||||||
|
|
||||||||||||
| 16. long |
|
|||||||||||
|
||||||||||||
|
|
||
| 17. Examples of integer types |
|
|
|
||
|
|
||
| 18. Notes on integer types |
|
|
|
||
|
|
||
| 19. More on integers |
|
|
|
||
|
|
||||||||||||
| 20. Float |
|
|||||||||||
|
||||||||||||
|
|
||||||||||||
| 21. double |
|
|||||||||||
|
||||||||||||
|
|
||
| 22. Casting primitives |
|
|
|
||
|
|
||
| 23. postfix identifiers |
|
|
|
||
|
|
||
| 24. Strings |
|
|
|
||
|
|
||
| 25. Wrapper objects |
|
|
|
||
|
|
||
| 26. Wrapper examples |
|
|
|
||
|
|
||
| 27. Converting primitives to String |
|
|
|
||
|
|
||
| 28. primitive to string examples |
|
|
|
||
|
|
||
| 29. Strings to primitives |
|
|
|
||
|
|
||
| 30. More on String to Primitive conversion |
|
|
|
||
|
|
||
| 31. Warning about Wrapper objects!!! |
|
|
|
||
|
|
||
| 32. Pass by reference, pass by value |
|
|
|
||
| name | boolean |
|---|---|
| length | 1 byte |
| legal values | true or false (no caps) |
| default value | false |
| operations | Can be used ONLY in boolean operations (=, ==, !=, !, &, &&, |, ||, ^, ?:) |
boolean continue = true;
while (continue){
//code goes here...
if(continue){
//code goes here...
continue = false
}// end if
} // end while
| name | char |
|---|---|
| length | 16 bit (only ONE character) |
| legal values | unicode (ASCII + extensions) |
| default value | \u0000 (null character) |
| operations | any of the typical operations assignment boolean including if , while, for, switch it can be cast into other primative types (although it might lose some information) |
| name | byte |
|---|---|
| length | 8 bits |
| legal values | -128 to 127 |
| default value | 0 |
| operations | Any operations, but boolean operations ALWAYS produce a boolean result |
| name | int |
|---|---|
| length | 32 bits |
| legal values | -2,147,483,648 to 2,147,483,647 |
| default value | 0 |
| operations | Any operations, but boolean operations ALWAYS produce a boolean result |
| name | long |
|---|---|
| length | 64 bits |
| legal values | -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 |
| default value | 0 |
| operations | Any operations, but boolean operations ALWAYS produce a boolean result |
| name | float |
|---|---|
| length | 4 bytes |
| legal values | @ 2 to +/- 38 |
| default value | 0.0f |
| operations | Can be used for assignment, comparison. Can be cast to other primitive types, but may lose value |
| name | double |
|---|---|
| length | 8 bytes |
| legal values | @ 2 to +/- 300 |
| default value | 0.0d |
| operations | Can be used for assignment, comparison. Can be cast to other primitive types, but may lose value |