Java Strings

A String is an object that represents a sequence of characters.
For example, “HelloWorld” is a string of 10 characters.
For example:

String s = "HelloTech";

The + (plus) operator between strings adds them together to make a new string. This process is called concatenation.The resulted string is the first string put together with the second string.For example:

String firstName, lastName;
firstName = "sani";
lastName = "kamal";
// Prints: My name is sani kamal
The char data type represents a single character.

One thought on “Java Strings

Leave a Reply


You are commenting using your account. Log Out /  Change )

Google+ photo


Twitter picture


Facebook photo



Connecting to %s