Key Concepts

Review core concepts you need to learn to master this subject

length() String Method in Java

String str = "Codecademy"; System.out.println(str.length()); // prints 10

In Java, the length() string method returns the total number of characters – the length – of a String.

String Methods
Lesson 1 of 1

What you'll create

Portfolio projects that showcase your new skills

Pro Logo

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory

Pro Logo