Back to Browse

2.6 Strings | CSAwesome APCSA Java

661 views
Apr 8, 2022
27:16

#apcsa #java Strings in Java are objects of the String class that hold sequences of characters. String objects can be created by using string literals (String s = “hi”;) or by calling the String class constructor (String t = new String(“bye”);). new is used to create a new object of a class. null is used to indicate that an object reference doesn’t refer to any object yet. String objects can be concatenated using the + or += operator, resulting in a new String object. Primitive values can be concatenated with a String object. This causes implicit conversion of the values to String objects. Escape sequences start with a backslash \ and have special meaning in Java. Escape sequences used in this course include ", \, and \n to print out a quote, backslash, and a new line.

Download

0 formats

No download links available.

2.6 Strings | CSAwesome APCSA Java | NatokHD