Free 1Z0-804 Braindumps

  • Exam Number: 1Z0-804
  • Provider: Oracle
  • Questions: 150
  • Updated On: 19-Apr-2019

Given the code fragment:

DataFormat df;

Which statement defines a new Dateformat object that displays the default date format for the
UK Locale?

A. df = DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale (UK));
B. df = DateFormat.getdatDataInstance (DateFormat.DEFAULT, UK);
C. df = DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale.UK);
D. df = new DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale.UK);
E. df = new DateFormat.getdatDataInstance (DateFormat.DEFAULT, Locale (UK));

Answer(s): C
The UK locale is constructed withLocale.UK.
To format a date for a different Locale, specify it in the call to getDateInstance().
DateFormat df = DateFormat.getDateInstance(DateFormat.LONG, Locale.FRANCE);
Note:getDateInstance(int style, Locale aLocale)
Gets the date formatter with the given formatting style for the given locale.
Reference: Class DateFormat

public class DoubleThread { public static void main(String[] args) { Thread t1 = new Thread()
{ public void run() {
Thread t2 = new Thread(t1); // Line 9;
Which two are true?

A. A runtime exception is thrown on line 9.
B. No output is produced.
C. Greeting is printed once.
D. Greeting is printed twice.
E. No new threads of execution are started within the main method.
F. One new thread of execution is started within the main method.
G. Two new threads of execution are started within the main method.

Answer(s): C, E
Thread t2 is executed. Execution of T2 starts executionen of t1. Greeting is printed during the
execution of t1.

Get The Premium Version
 Test Questions PDF from

 Test Questions PDF from