What feature allows different methods to have the same name and arguments type, but a different implementation is called?
- overloading
- overriding <-
- Java does not permit methods with same name and type signature
- None of the above
1. Input two integers: a, b.
2. Initialize the value of x to a and the value of y to b.
3. If x > y then set x to x - y.
4. If x < y then set y to y - x.
5. Repeat steps 3 and 4 until x = y.
6. Output x (or y) and halt.
What will this algorithm output in step 6 if we begin with a = 2437, b = 875?
- 0 / 1 <- / 2 / 3 / 875 / 2437
Which of the following handles function calls?
- The data heap
- The stack <-
- The processor's registers
- The main memory
- The system calls