Consider the following program and choose the correct option:
import java.util.Locale; public class Main { public static void main(String []args) { Locale locale1 = new Locale("en"); //#1 Locale locale2 = new Locale("en", "in"); //#2 Locale locale3 = new Locale("th", "TH", "TH"); //#3 Locale locale4 = new Locale(locale3); //#4 System.out.println(locale1 + " " + locale2 + " " + locale3 + " " + locale4); }/*from w ww . j a v a 2 s .c o m*/ }
F.
the Locale class supports three constructors that are used in statements #1, #2, and #3; however, there is no constructor in the Locale class that takes another Locale object as argument, so the compiler gives an error for statement #4.