Curriculum
Course: Java Basic
Login

Curriculum

Java Basic

Java Home

0/1

Java Introduction

0/1

Java Get Started

0/1

Java Syntax

0/1

Java Comments

0/1

Java Type Casting

0/1

Java Operators

0/1

Java Booleans

0/1

Java Switch

0/1

Java Break / Continue

0/1

Java Errors and Exception

0/1
Text lesson

toLowerCase()

Example

Transform a string to include uppercase and lowercase letters.

String txt = "Hello World";
System.out.println(txt.toUpperCase());
System.out.println(txt.toLowerCase());

Definition and Usage

The toLowerCase() method changes a string to lowercase letters.

Note: the toUpperCase() method alters a string to uppercase letters.

Syntax

public String toLowerCase()

Parameters

None.

Technical Details

Returns:

A string value that represents the newly converted string in lowercase.