COMS W3134 Lecture Notes - Lecture 3: Function Object

44 views2 pages

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 )

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers