Java Strings

In this lesson, the basic string data type in Java and the various inbuilt functions that the language offers will be explained.

Introduction

String is a class that is built into the java.lang package. This represents character strings, i.e., text type of data is stored in the String type in Java.

String literals

String literals are a means of expressing text type of data in Java. They start with double-quotation marks and then contain zero or more characters, including Unicode characters. The String literal must end with another double-quotation marks ". This would be a String in Java, "Hello World!".

Get hands-on with 1200+ tech skills courses.