CSE 116 Lecture Notes - Lecture 5: Bit Error Rate

44 views3 pages

Document Summary

Must declare it before we can use it: type, brackets, & name, names follow usual rules, variable is array of the type, so use any legal type, cannot use until after instantiating array. Object[] parkinglot = new car[17]; int [] bob; bob = new int[intvar]: type is for elements & must be assignable to variable"s type. Clicker question: which declaration is not legal? answer: c. float fbob[17]; Memory trace example int[] data = new int[3]; int[] al = data; for (int i = 0; i < data. length; i++) { data[i] = i * 2; } al[0] = 5; al = new int[1]; al[0] = 7; Within an array entries like individual variables. Clicker question: which is correct java code? answer: e: int s = 45; int[] d = new int[2]; d[s-4] = 32453; How do we organize data? arrays are the best option: use multi-dimensional arrays to create matrices.

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

Related Documents