Skip to content

Commit 85c179c

Browse files
committed
use Locale.ROOT for toLowerCase/toUpperCase
1 parent f7e974b commit 85c179c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

chapter01-basic_types.jsh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ System.out.println(multilineText);
8585
System.out.println("hello".length());
8686

8787
// to upper/lower case
88-
System.out.println("hello".toUpperCase());
89-
System.out.println("hello".toLowerCase());
88+
// Locale.ROOT here ask for a result independent of the OS language
89+
System.out.println("hello".toUpperCase(Locale.ROOT));
90+
System.out.println("hello".toLowerCase(Locale.ROOT));
9091

9192
// repeat the same pattern
9293
System.out.println("|*|".repeat(3));

0 commit comments

Comments
 (0)