Novice Java Tutorial with Apache NetBeans 11.0: 5 String Literals

Опубликовано: 18 Март 2026
на канале: Bruce Lamb
42
0

Explains what string literals are and lightly introduce a character literal.
To copy and paste code visit: www.carbon12.life/Tutorials/Novice_Java/5_String_Literal.php

Explain what a string is in Java. (0:00)

String literals (The only type of string we have used in this series so far) are surrounded by double quatation marks. (0:37)

A string is an array of characters. (1:06)
Arrays are discussed in a different video. String is a sequence of characters that have an order such as a word in the English language.

Arrays are introduced in the Beginner series in this video but some knowledge of variables is required before proceeding with it:

Demonstrate what a Character literal is. (1:35)
A character literal is a single character sourounded by single quotations marks such as 'W'.
Escape characters such as the tab '\t' is also a valid way to represent a single character literal.

Alter the example from a string literal "W" to a character literal 'W'. (2:13)