Homework #28


Java procedure types
This problem is not from your textbook.

In Lecture 27, we talked about type signatures for functions. In some languages, certain functions might seem to have multiple signatures. Enumerate as many type signatures as you can for the binary "+" operator in Java. For example,

    (int * int) -> int
    (float * float) -> float

and so on. Think about all of the possible types that you can join by the "+" operator, including strings.

How many of these combinations do you think are implemented directly as special cases in the Java compiler? How might you be able to implement all of the other combinations?


You must log in first before submitting homework assignments.

Instructions on submitting homework is here


Last updated at 3:10 pm on Monday, November 07, 2005.