1Z0-804 Exam Details

  • Exam Code
    :1Z0-804
  • Exam Name
    :Java SE 7 Programmer II
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :150 Q&As
  • Last Updated
    :Dec 08, 2021

Oracle 1Z0-804 Online Questions & Answers

  • Question 131:

    Sam has designed an application. It segregates tasks that are critical and executed frequently from tasks that are non critical and executed less frequently. He has prioritized these tasks based on their criticality and frequency of execution. After close scrutiny, he finds that the tasks designed to be non critical are rarely getting executed.

    From what kind of problem is the application suffering?

    A. race condition
    B. starvation
    C. deadlock
    D. livelock

  • Question 132:

    Given the classes:

    class Pupil {

    String name = "unknown";

    public String getName() {return name;}

    }

    class John extends Pupil {

    String name = "John";

    }

    class Harry extends Pupil {

    String name = "Harry";

    public String getName() {return name;}

    }

    public class Director {

    public static void main(String[] args) {

    Pupil p1 = new John();

    Pupil p2 = new Harry();

    System.out.print(p1.getName() + " ");

    System.out.print(p2.getName());

    }

    }

    What is the result?

    A. John Harry
    B. unknown Harry
    C. john unknown
    D. unknown unknown
    E. Compilation fails.
    F. An exception is thrown at runtime.

  • Question 133:

    You have been asked to create a ResourceBundle file to localize an application.

    Which code example specifies valid keys menu1 and manu2 with values of File Menu and View Menu?

    A. File Menu View Menu
    B. menu1File Menu menu1View Menu
    C. menu1m File menu, menu2, view menu
    D. menu1 = File Menu menu2 = View Menu

  • Question 134:

    Given the Greetings.properties file, containing:

    HELLO_MSG = Hello, everyone!

    GOODBYE_MSG = Goodbye everyone!

    And given:

    import java.util.Enumeration;

    import java.util.Locale;

    import java.util.ResourceBundle;

    public class ResourceApp {

    public void loadResourceBundle() {

    ResourceBundle resource = ResourceBundle.getBundle("Greetings", Locale.US);

    System.out.println(resource.getObject(1));

    }

    public static void main(String[] args) {

    new ResourcesApp().loadResourceBundle();

    }

    }

    What is the result?

    A. Compilation fails
    B. HELLO_MSG
    C. GOODGYE_NSG
    D. Hello, everyone!
    E. Goodbye everyone!

  • Question 135:

    Given this code fragment:

    public static void main(String[] args) {

    try {

    String query = "SELECT * FROM Item";

    Statement stmt = conn.createStatement();

    ResultSet rs = stmt.executeQuery(query);

    ResultSetMetaData rsmd = rs.getMetaData(); // Line 14

    int colCount = rsmd.getColumnCount();

    while (rs.next()) {

    for (int i = 1; i <= colCount; i++) {

    System.out.print(rs.getObject(i) + " "); // Line 17

    }

    System.out.println();

    }

    } catch (SQLException se) {

    System.out.println("Error");

    }

    Assume that the SQL query returns records. What is the result?

    A. Compilation fails due to error at line 17
    B. The program prints Error
    C. The program prints each record
    D. Compilation fails at line 14

  • Question 136:

    Which two compile?

    A. interface Compilable { void compile(); }
    B. interface Compilable { final void compile(); }
    C. interface Compilable { static void compile(); }
    D. interface Compilable { abstract void compile)); }
    E. interface Compilable { protected abstract void compile (); }

  • Question 137:

    Given the code fragment:

    try {

    conn.setAutoCommit(false);

    stmt.executeUpdate("insert into employees values(1,'Sam')");

    Savepoint save1 = conn.setSavepoint("point1");

    stmt.executeUpdate("insert into employees values(2,'Jane')");

    conn.rollback();

    stmt.executeUpdate("insert into employees values(3,'John')");

    conn.setAutoCommit(true);

    stmt.executeUpdate("insert into employees values(4,'Jack')");

    ResultSet rs = stmt.executeQuery("select * from employees");

    while (rs.next()) {

    System.out.println(rs.getString(1) + " " + rs.getString(2));

    }

    } catch(Exception e) {

    System.out.print(e.getMessage());

    }

    What is the result of the employees table has no records before the code executed?

    A. 1 Sam
    B. 4 Jack
    C. 3 John 4 Jack
    D. 1 Sam 3 John 4 Jack

  • Question 138:

    Given these facts about Java types in an application:

    -

    Type x is a template for other types in the application.

    -

    Type x implements dostuff ().

    -

    Type x declares, but does NOT implement doit().

    -

    Type y declares doOther() . Which three are true?

    A. Type y must be an interface.
    B. Type x must be an abstract class.
    C. Type y must be an abstract class.
    D. Type x could implement or extend from Type y.
    E. Type x could be an abstract class or an interface.
    F. Type y could be an abstract class or an interface.

  • Question 139:

    Which two statements are true about Rowset subinterfaces?

    A. A JdbcRowSet object provides a JavaBean view of a result set.
    B. A cachedRowset provides a connected view of the database.
    C. A FilteredRowSet object filter can be modified at any time.
    D. A webRowset returns JSON-formatted data.

  • Question 140:

    Given the database table:

    And given this class:

    Assume that the SQL integer queries are valid. What is the result of compiling and executing this code fragment? Refer to the exhibit.

    A. A
    B. B
    C. C
    D. D
    E. E

Tips on How to Prepare for the Exams

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-804 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.