Example usage for java.util Locale ITALIAN

List of usage examples for java.util Locale ITALIAN

Introduction

In this page you can find the example usage for java.util Locale ITALIAN.

Prototype

Locale ITALIAN

To view the source code for java.util Locale ITALIAN.

Click Source Link

Document

Useful constant for language.

Usage

From source file:Main.java

public static void main(String[] args) {
    Locale locale = Locale.ITALIAN;

    System.out.println("Locale1:" + locale);

    // print the country of this locale
    System.out.println("Country:" + locale.getCountry());

}

From source file:PrintfExamples.java

public static void main(String[] args) {
    System.out.printf(Locale.ITALIAN, "value: %f\n", 3.14);
}

From source file:PrintfExamples.java

public static void main(String[] args) {
    System.out.printf(Locale.ITALIAN, "The date is %tc\n", new Date());
    System.out.printf(Locale.CHINA, "The date is %tc\n", new Date());
    System.out.printf(Locale.FRENCH, "The date is %tc\n", new Date());
    System.out.printf(Locale.GERMAN, "The date is %tc\n", new Date());
}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    Locale locale = Locale.ITALIAN;
    Date date = new Date();

    String s = DateFormat.getTimeInstance(DateFormat.SHORT, locale).format(date);
    System.out.println(s);/*from www  .j  a va  2  s  . c om*/
}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    Locale locale = Locale.ITALIAN;
    Date date = new Date();

    DateFormat df = DateFormat.getTimeInstance(DateFormat.MEDIUM, locale);

    String s = df.format(date);//from www  .ja v  a 2s  .c om
    System.out.println(s);
}

From source file:Main.java

public static void main(String[] argv) throws Exception {

    Locale locale = Locale.ITALIAN;
    Date date = new Date();

    DateFormat df = DateFormat.getTimeInstance(DateFormat.SHORT, locale);

    String s = df.format(date);/*from   www  .ja v  a2 s  .c  o  m*/
    System.out.println(s);
}

From source file:DisplayNames.java

public static void main(String args[]) {
    Calendar now = Calendar.getInstance();
    // Locale locale = Locale.getDefault();
    Locale locale = Locale.ITALIAN;
    Map<String, Integer> names = now.getDisplayNames(Calendar.DAY_OF_WEEK, Calendar.LONG, locale);
    System.out.println(names);// w  w  w .  ja  va 2s.  co  m
    String name = now.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, locale);
    System.out.printf("Today is a %s.%n", name);
}

From source file:DisplayNameOutput.java

public static void main(String[] argv) {

    Locale defaultLocale = Locale.getDefault();
    System.out.println(defaultLocale.getDisplayName());
    System.out.println(defaultLocale.getDisplayName(Locale.ITALIAN));
    System.out.println(defaultLocale.getDisplayName(Locale.US));
}

From source file:MainClass.java

public static void main(String args[]) throws Exception {
    Locale defaultLocale = Locale.getDefault();
    System.out.println(defaultLocale.getDisplayName());
    System.out.println(defaultLocale.getDisplayName(Locale.ITALIAN));
    System.out.println(defaultLocale.getDisplayName(Locale.US));
}

From source file:MainClass.java

public static void main(String args[]) throws Exception {

    Date date = new Date();
    System.out.printf(Locale.ITALIAN, "The date is %tc\n", date);

}