INSY 3433 Chapter Notes - Chapter 6: Reference Type, Pariah Dog, Exception Handling

25 views4 pages

Document Summary

Chapter 6: reference types are all nonprimitive types, primitive-type variable can hold exactly 1 value of its declared type @ a time, reference type variables store the addresses of objects in the computer"s memory. String[] x = new string[27]: square brackets can be placed either after variable type/after array variable name when only. Examples using arrays: can create an array & initialize its elements w/ an array initializer, ex: int [] n = {10, 20, 30, 40, 50}; Improves performance by eliminating the need to copy (possibly) large amounts of data: all arguments are passed by value in java, objects can"t be passed to methods. Using command-line arguments: possible to pass arguments form the command line to an app via main"s string[] parameter, command-line arguments separated by white space, not commas. Class arrays: class arrays provides static methods for common array manipulations & is imported using java. util. arrays.

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