Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
6 Cards in this Set
- Front
- Back
Scope rules |
1. Scope of method parameters is the method body. 2. Scope of local-variable is from point of declaration to end of block 3. Scope of for-loop variable in initalizatiin-section of for-loop is visible in body of for statement. 4. Scope of method or field is entire body of Class. |
|
Shadowing/skuggning |
If block declares variable with same name as Class field, the field is "hidden". To get around, use this.<field> if instance variable and class.<field> if static. |
|
När en array skapas, vad är defaultvärdena? |
0 för numeriska typer, false för boolean och null för referenstyper |
|
Vad är "method call stack" |
LIFO. Lagrar stack frames(kallas även activation Records) som innehåller returadress(vart fortsätta efter metoden), lokala variabler(inklusive parametrar). |
|
Tre sätt att returnera kontroll till anropande funktion? |
Return. Return expression. Eller slut på metoden (}) och returtypen är void. |
|
Vad kallas det när fler anrop görs än vad som kan hanteras av jvm(t.ex fullt minne)? |
Stack overflow |