Answer:
Include the answers on an additional sheet.
The Intel 4004 is generally regarded as the first commercially available microprocessor
Answer:
The execution resumes in the finally block if one exists or otherwise from the next statement following the try...catch block.
Explanation:
Once an exception has been thrown and caught in the code, the execution continues with the statements in the finally block if one exists. If there is no finally block defined then execution resumes from the next statement following the try... catch block. For example:
try{
//An exception is raised
}
catch (Exception e){
//Exception is handled
}
System.out.println("After try...catch");
In this code segment, the next statement to be executed after catch is the System.out.println();
Answer:
B. string -> (int -> int)
Explanation:
We are going to perform comparison operations '->'. It is important to notice that the comparison operation gives us a bool value (True or False) and the comparison operation is legal if and only if the data types to be compared are the same.
Example:
int(4)->int(5) False
int(4)->int(4) True
int(4)->string(4) Error, data types don't match
For this reason:
- A. Is legal because float -> float evaluates to True, True is a boolean value and bool -> bool is legal because both are the same data type.
- B. Is illegal because int -> int evaluates to True, True is a boolean value and string is not a boolean (string -> bool).
- C. Is legal because int is the same type than int.
- D. Is legal because the list is the same type than list regardless it's content.
Note:
The operations inside parentheses are evaluated first.
List is a type by itself regardless of its content.