Strings
Work with text using Java String objects and useful String methods.
Java Code
Study the example and understand what each part does.
public class Main {
public static void main(String[] args) {
String name = "Vinsoft Lab";
System.out.println(name);
System.out.println(name.length());
System.out.println(name.toUpperCase());
System.out.println(name.toLowerCase());
}
}
Java code normally runs using the Java Development Kit on a computer, Android Studio or another Java development environment. This course page presents the code examples without pretending that the browser is running Java directly.
Expected Output / Result
Vinsoft Lab 11 VINSOFT LAB vinsoft lab
Finished this lesson?
Mark it complete to update your course progress.