CSE 2221 Final: CSE 2221 Param Passing and Arrays Notes

260 views1 pages

Document Summary

Parameter-passing mechanism of java: may be termed call-by-copying because argument values are copied into formal parameters, may be termed call-by-value because argument values are copied into formal parameters. There are other ways it might have been don (and is done in some languages) Array: an array is a group of similar variables, all of the same type, and with systematically related names that i(cid:374)(cid:448)ol(cid:448)e spe(cid:272)ial s(cid:455)(cid:374)ta(cid:454) usi(cid:374)g [ ] Each array element, e. g. , a[(cid:1004)], a[(cid:1005)], , a(cid:272)ts like a si(cid:374)gle (cid:448)aria(cid:271)le of the t(cid:455)pe used i(cid:374) the de(cid:272)laratio(cid:374) of array a. This is entirely parallel to the use of subscripted variables in mathematics, e. g. , x0, x1, . Just as x0 is pronounced (cid:862)(cid:454)-sub-(cid:1004)(cid:863) i(cid:374) (cid:373)athe(cid:373)ati(cid:272)s, a[(cid:1004)] is usuall(cid:455) pro(cid:374)ou(cid:374)(cid:272)ed (cid:862)a-sub-(cid:1004)(cid:863) i(cid:374) a ja(cid:448)a progra(cid:373) In mathematics, a group of related variable x0, x1, , (cid:454)n-1 is called a vector x of length n.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers

Related Documents