1. Casting is the action of _______________________ two different data types such as converting an int to a double and vice versa.
2. This example shows that we have converted the double value 15.23 into an integer, which left only the whole number and the decimal places to be cut off.
3. Even though it is possible to convert an int to a double without casting, it is best practice to always use casting for precision and thorough logic.
4. When you convert an int to a double, a _____________ will be added to match with the structure of a double. For example, double varOne = (double) 15; assigns 15.0 to varOne.
5. When casting (e.g from a double to an integer) it is possible to lose:
6. What is printed as a result of executing this code segment?
7. Variables that are declared inside a method are called _______________ because they can only be utilized and referenced in the method itself.
8. In the following example, we cannot print exampleVariableThree inside the main method because ?
9. A local variable is not visible to any other method besides the one in which it exists. If you have a variable that will be used in multiple classes, you must make sure it is ____________________.
10. If you are referencing a local variable outside of the method it exists in, you will get a ___________ due to access control and visibility.
11. Which variables in the code below are local variables?
12. In the above code segment, paramOne is a parameter, and parameter are also considered local variables.
13. In the code segment above, varOne is a field variable. Field variables are _____________________________.
14. Field variables, are similar to local variables and they can NOT be called in any of the methods that exist in the same class.
15. Instance variables are non-static fields and therefore declared without _____________________________.
16. There are two categories of field variables: _______ variables and ________ variables.
17. There are two field variables in this code segment. If you add the values held in these variables together, you would get:
18. Casting a double value to an int causes the digits to the right of the decimal point to be _____________.
19. Integer values in Java are represented by values of type int, which are stored using a finite amount (4 bytes) of memory. This suggests that?..
20. If an expression would evaluate to an int value outside of the allowed range, an _______________ occurs. This could result in an incorrect value within the allowed range.
21. ___________ is the process of providing value to a variable at declaration time. Any attempt of setting a variable's value after its declaration is called assignment
22. Automatic type conversion is done when either both sides (left and right) are of same type or the left hand (destination) side is larger in size. The latter is called widening.
23. Why will the following code result in a compilation error?
24. Fill in the blanks in the following paragraph.
25. And here's a bonus question on expression evaluation: What is printed as the result of executing this code segment?
int varTwo = 56;
int varThree = 25;
varOne = varTwo / varThree;