COMP 202 Lecture Notes - Lecture 20: Concatenation

15 views4 pages
jc123 and 40170 others unlocked
COMP 202 Full Course Notes
100
COMP 202 Full Course Notes
Verified Note
100 documents

Document Summary

Strings are not primitive types, even if we"ve been using them as if they were. Arrays are regular reference types -- some people call them mutable . Immutable : you can not change the contents of a variable of type string after creating it. But we kind of feel like we have done this String phrase = cats ; phrase = phrase + dogs ; It looks like we are changing the value of a string after creating it! Immutable reference types are more secure, and more intuitive to use. Their behavior essentially mimics the behavior of primitive types. Midterm review (questions people got wrong) int[][] a = {{1,2,3}, {1,2}, null, {4,5,6,7}}; for(int i=0; i

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