Text values with String and char
Learn to work with text data in Java.
A variable used to hold a string value in Java has the type String
. The string data itself, when typed in quotes in code, is called a string literal; Java should interpret it as literal string data, and not as code.
What does the following code print? Is there an error in the code? Fix it.
Get hands-on with 1400+ tech skills courses.