ITEC 1620 Lecture 19: 1620_lecture_19_slides

34 views21 pages

Document Summary

Text primitive is char a single character. Useful text (e. g. words) are multiple characters. Useful manipulations: substring(), touppercase(), substring(), touppercase(), replace(), etc. Three important (primitive) operations exist i t. Anything inside double quotes is a string literal. String literals appear as a primitive datatypeyp. String literals are not normal java syntax hides that an object is created. Normal java syntax char[] text = new char[] { h", e", l", l", o"}; Primitive datatypes can be converted into strings through concatenation. Yes if strings are primitive datatypes. No if strings are normal objects t if st i l bj. To make first == second true, java makes the identifiers refer to the same object first second. What happens if second is changed? second. touppercase(); pp. If the string referred to by second is changed then the string referred to by changed, then the string referred to by first will also change. The independent declarations do not imply this cannot let it happen.

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

Related Questions