Java String

  • Strings are an incredibly common type of data in computers. This page introduces the basics of Java strings: chars, +, length(), and substring().
  • A Java string is a series of characters gathered together, like the word "Hello", or the phrase "practice makes perfect". Create a string in the code by writing its chars out between double quotes.

  • String stores text -- a word, an email, a book
  • All computer languages have strings, look similar
  • "In double quotes"
  • Sequence of characters ("char")
String str = "Hello";
This picture shows the string object in memory, made up of the individual chars H e l l o. We'll see what the index numbers 0, 1, 2 .. mean later on.
string Hello in memory


Java String

StringTokenizer in Java

Immutable String in Java

Java String compare

String Concatenation in Java

Substring in Java

Java String class methods

Java StringBuffer class

Java StringBuilder class

Difference between String and StringBuffer

Difference between StringBuffer and StringBuilder

How to create Immutable class?

Java toString() method

No comments:

Post a Comment