216k views
0 votes
g Unlike when you create a String, when you create a StringBuilder, you must use the keyword ____________.

User Johndeu
by
3.9k points

1 Answer

5 votes

Answer:

Unlike when you create a String, when you create a StringBuilder, you must use the keyword new

Step-by-step explanation:

Strings are used in programming which also opens the way for StringBuilder to be used too. In javascript, for instance, variables are useful for storing data, We have "Let" and "const" variables. Const variables cannot be changed after they’re created. The data stored are in types an example is a string. Strings allow one to write a value and store the result in a variable.

For example, using the dot operator, when you:

console.log('love'.length); // Prints 4

Note that console.log() allows the computer to evaluate the expression inside the parentheses and print that result to the console.

.length prints 4 as the result. This shows how the string has a property that stores the number of characters in that string.

StringBuilder with the keyword "new" is used when we want to change or modify data property stored in a string.

User John Tiggernaught
by
4.2k points