COMS W3134 Lecture Notes - Lecture 3: Function Object
Document Summary
Show assumption implies known property is false. Thus , original assumption was erroneous introduction to recursion. A function that is defined in terms of itself is called recursive. Example of recursive method : defining t that satisfies. And fl x ) = 2 f- ( x - i 1-1 2. Recursive java method doesn"t make sense without a base case. Base cases : always have base cases. Making progress : recursive call must always be to a case that makes progress toward base case. Implementing generic components pre - java 5: generic mechanism : if the implementation is identical except for the basic type of object , a generic implementation can be used to describe the basic functionality . Using " object " for gene ri city. Primitive types cannot be used , only reference types. Wrapper for int is " integer " Each wrapper object is immutable ( state never changes )