| BASIC | JAVA | |
|---|---|---|
| declaration statements |
|
|
| single precision numbers |
|
|
| increment statements |
|
|
| count-controlled loops |
|
|
| condition-controlled loops |
|
*there is no "until" in Java
|
| conditional statements |
|
*you never use "then" in Java
|
| multiple case decision structure |
*theVariable could be any type
|
*theVariable must be an integer*you can't give a range of values for a case |
| branching |
|
|
| equality comparison operator |
*equality comparison operator is same as assignment operator
|
*conditional uses = = for the equality sign
|
| "and" operator for boolean expressions |
|
*make sure you use both of those ampersands
|
| "or" operator for boolean expressions |
|
*that | symbol is right next to the curly bracket key. Make sure you use two of them.
|
| arrays |
|
*arrays in Java are always zero-based;*you need to create the array to hold the objects and you need to create each individual object itself, typically with the class constructor. |
| user-defined types |
|
|
| creating subroutines |
|
|
| creating subroutines that return something |
|
|
| calling subroutines (no return value) |
|
|
| calling subroutines (with a return value) |
|
|
| named constants |
|
|
| modulus operator |
|
|
| integer ranges |
integers range from -32767 to 32767 long integers range from -2^31 to 2^31 |
integers in java are like longs in qb (-2^31 to 2^31) longs are really long! (-2^63 to 2^63) |