Java Locale.LanguageRange create from String

Description

Java Locale.LanguageRange create from String

import java.util.List;
import java.util.Locale;

public class Main {

   public static void main(String[] args) {
      List<Locale.LanguageRange> list1 = Locale.LanguageRange.parse("ja-JP, en-US");
      list1.stream().forEach((range) -> {
         System.out.println("Range:" + range.getRange());
      });//ww w .  java2  s.  c  om

      
   }
}



PreviousNext

Related