[Free] 2018(Jan) EnsurePass Testinsides Oracle 1z0-850 Dumps with VCE and PDF 21-30

By | January 25, 2018

Ensurepass.com : Ensure you pass the IT Exams
2018 Jan Oracle Official New Released 1z0-850
100% Free Download! 100% Pass Guaranteed!
http://www.EnsurePass.com/1z0-850.html

Java Standard Edition 5 and 6, Certified Associate Exam

Question No: 21 – (Topic 1)

You need to create a class that maintains a customer#39;s account balance. The class must allow both credits (deposits) and debits (withdrawals) to the account.

Which class correctly implements this functionality?

  1. public class Account { double balance;

    public void debit(double amount) { amount = balance – amount;

    }

    public void credit(double amount) { amount = balance amount;

    }

  2. public class Account { double balance;

    public void debit(double amount) { balance = balance – amount;

    }

    public void credit(double amount) { balance = balance amount;

    }

  3. public class Account { double balance;

    balance = balance – amount;

    }

    public void credit(double amount) { double balance;

    balance = balance amount;

    }

  4. public class Account {

    public void debit(double amount) { double balance;

    balance = balance – amount;

    }

    public void credit(double amount) { double balance;

    balance = balance amount;

    }

  5. public class Account { double balance;

public void debit() { double debit;

balance = balance – debit;

}

public void credit() { double credit

balance = balance credit;

}

Answer: B

Question No: 22 – (Topic 1)

Which two are associated with the web tier in a multitier web-based application? (Choose two.)

  1. generate dynamic content

  2. implement business logic

  3. process user input

  4. integrate with database systems

  5. store state persistently

Answer: A,C

Question No: 23 – (Topic 1)

Click the Exhibit button.

Which correctly implements the relationships shown in the diagram?

Ensurepass 2018 PDF and VCE

  1. public class Y { private Z[] z1and2; public Y(Z[] z1and2) {

    if (z1and2 == null || z1and2.length != 2) { System.exit(1); // ERROR!

    }

    this.z1and2 = z1and2;

    }

    }

  2. public class Z { private Y[] y1and2; public Z(Y[] y1and2) {

    if (y1and2 == null || y1and2.length != 2) { System.exit(1); // ERROR!

    }

    this.y1and2 = y1and2;

    }

    }

  3. public class Z { private Y y1; private Y y2; public Z(Y y1) {

    if (y1 == null) System.exit(1); // ERROR! this.y1 = y1;

    }

    public Z(Y y1, Y y2) { this(y1);

    this.y2 = y2;

    }

    }

  4. public class Y { private Z z1; private Z z2; public Y(Z z1) {

if (z1 == null) System.exit(1); // ERROR! this.z1 = z1;

}

public Y(Z z1, Z z2) { this(z1);

this.z2 = z2;

}

}

Answer: D

Question No: 24 – (Topic 1)

Which is a benefit of Swing clients?

  1. They can be used without a JRE on the client.

  2. They are more universally supported by browsers than thin clients.

  3. They can provide a richer graphical user interface experience than thin clients.

  4. They are easier to deploy than thin clients.

    Answer: C

    Question No: 25 – (Topic 1)

    Given:

    1. class Test {

    2. public static void main(String args[]) {

    3. int num; 4. num = 10;

  1. calc(num);

  2. System.out.println(quot;num = quot; num); 7. }

8.

  1. static void calc(int num) { 1 0. num = 100; 11. } 12. }

    What is the result?

    1. num = 10

    2. num = 100

    3. Compilation fails because of an error at line 3.

    4. num = 110

    5. Compilation fails because of an error at line 9.

      Answer: A

      Question No: 26 – (Topic 1)

      Given:

      1. abstract class A {}

      2. class B {}

      3. interface C {}

      4. interface D {}

      5. // insert code here

        Which, inserted at line 5, results in a compilation failure?

        1. class E implements C {}

        2. class E extends B implements D {}

        3. class E extends A {}

        4. interface E extends C, D {}

        5. class E extends A, B {}

        6. class E implements C, D {}

Answer: E

Question No: 27 – (Topic 1)

Why should package names in Java be unique?

  1. to provide the Internet location from which the package can be downloaded

  2. to programatically declare specific ownership of classes in the package

  3. to avoid class name conflicts if two development groups use the same package and class names

  4. to allow classes in the package to be accessed by classes outside of that package

Answer: C

Question No: 28 – (Topic 1)

Given:

  1. String s = quot; abcdcba quot;;

  2. int x = 2;

  3. s = s.trim();

  4. if (s.length() lt; 8) {

  5. x = s.indexOf(#39;c#39;, 3);

23. }

24. System.out.println(quot;x = quot; x); What is the result?

  1. x = 5

  2. x = 3

  3. x = 6

  4. x = 4

  5. x = 2

Answer: D

Question No: 29 – (Topic 1)

Given:

  1. int calc() {

  2. long x = 40L;

  3. int i = 30;

  4. i = x;

  5. System.out.println(quot;result is: quot; i); 8. }

    What is the result of calling calc()?

    1. Compilation fails because of an error at line 6.

    2. Compilation fails because of an error at line 4.

    3. result is: 40

    4. result is: 30

Answer: A

Question No: 30 – (Topic 1)

Which is an appropriate description of session beans?

  1. They are used to store persistent data.

  2. They are used to implement business processes.

  3. They are used to represent data in an RDBMS.

  4. They are used to share data among clients.

Answer: B

100% Ensurepass Free Download!
Download Free Demo:1z0-850 Demo PDF
100% Ensurepass Free Guaranteed!
1z0-850 Dumps

EnsurePass ExamCollection Testking
Lowest Price Guarantee Yes No No
Up-to-Dated Yes No No
Real Questions Yes No No
Explanation Yes No No
PDF VCE Yes No No
Free VCE Simulator Yes No No
Instant Download Yes No No

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.