Exam Name: Java Standard Edition 6 Programmer Certified Professional Exam

Similar documents
Sun Certified Programmer for the Java 2 Platform. SE6.0

Oracle. Exam Questions 1Z Java Standard Edition 6 Programmer Certified Professional Exam. Version:Demo

Java Standard Edition 6 Programmer Certified Professional Exam

Oracle 1Z0-851 Java Standard Edition 6 Programmer Certified Professional Exam

Testpassport. T e s tpas s port.

QUESTION: 1 Given a pre-generics implementation of a method: 11 public static int sum(list list) { 12 int sum = 0; 13 for ( Iterator iter = list.itera

itexamdump 최고이자최신인 IT 인증시험덤프 일년무료업데이트서비스제공

SUN Upgrade for the Sun Certified Java Programmer. SE 6.0. Download Full Version :

Exam : 1Z Title : Java Standard Edition 5 Programmer Certified Professional Upgrade Exam. Version : Demo

itexamdump 최고이자최신인 IT 인증시험덤프 일년무료업데이트서비스제공

Exam Questions 1z0-854

Exam : Title : Sun Certified Programmer for the Java 2 Platform.SE 5.0. Version : Demo

Vendor: Oracle. Exam Code: 1Z Exam Name: Java Certified Programmer. Version: Demo

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Exam Questions 1z0-853

ITCertMaster. Safe, simple and fast. 100% Pass guarantee! IT Certification Guaranteed, The Easy Way!

Oracle 1z Java Standard Edition 5 Programmer Certified Professional Upgrade Exam. Practice Test. Version:

Testpassport.

Exam Name: Developing Microsoft SharePoint Server 2013 Advanced Solutions

Collections and Generics

Exam Name: Implementing Cisco Unified Wireless Networking Essentials v2.0

Exam Name: Microsoft Essentials of Developing Windows Store Apps using HTML5 and JavaScript

Exam Name: Microsoft Software Testing with Visual Studio 2012

Exam Name: GIAC Secure Software Programmer-Java

Vendor: Oracle. Exam Code: 1Z Exam Name: Java SE 8 Programmer. Version: Demo

Answer: QUESTION: Answer:

Oracle 1Z Java Standard Edition 5 Programmer Certified Professional.

CSCI 201L Written Exam #1 Fall % of course grade

1Z0-851

Software 1 with Java. Initialization. Initialization. Initialization. Pass by Value. Initialization. Recitation No. 11 (Summary)

Exam Name: Service Provider, Professional (JNCIP-SP)

CSCI 201L Written Exam #1 - SOLUTION Fall % of course grade

Exam Name: Troubleshooting and Maintaining Cisco IP Networks

Exam Number/Code : 1Z Exam Name: Name: Java Standard Edition 6. Demo. Version : Programmer Certified Professional Exam.

Language Fundamentals

PASS4TEST IT 인증시험덤프전문사이트

What are the differences between the Set interface and the List interface?

1Z0-854

MB2-712 Q&As Microsoft Dynamics CRM 2016 Customization and Configuration

Class definition. complete definition. public public class abstract no instance can be created final class cannot be extended

Microsoft EXAM Analyzing and Visualizing Data with Microsoft Excel. m/ Product: Demo File

Exam Name: Recertification for MCSD: Web Applications

1Z0-804 Q&As. Java SE 7 Programmer II Exam. Pass Oracle 1Z0-804 Exam with 100% Guarantee

Exam Name: Upgrading Your Windows XP Skills to MCSA Windows 8.1

Exam Name: Developing Microsoft SharePoint Server 2013 Core Solutions

C Q&As. DB2 9.7 SQL Procedure Developer. Pass IBM C Exam with 100% Guarantee

Page No 1. AZ-302 EXAM Microsoft Azure Solutions Architect Certification Transition. For More Information:

CSCI 136 Written Exam #0 Fundamentals of Computer Science II Spring 2015

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Vendor: F5. Exam Code: 301. Exam Name: LTM Specialist. Version: DEMO

Module 2- 类 接口以及枚举一 选择题 :

Vendor: Oracle. Exam Code: 1Z Exam Name: Java SE 7 Programmer I. Version: Demo

MB6-704 Q&As Microsoft Dynamics AX 2012 R3 CU8 Development Introduction

CSCI 135 Exam #2 Fundamentals of Computer Science I Fall 2013

Vendor: Oracle. Exam Code: 1z Exam Name: Siebel Customer Relationship Management (CRM) 8 Business Analyst. Version: Demo

Java Collections. Readings and References. Collections Framework. Java 2 Collections. CSE 403, Spring 2004 Software Engineering

Q&As. Microsoft MTA Software Development Fundamentals. Pass Microsoft Exam with 100% Guarantee

Oracle. Java SE 8 Programmer I. 1z Version: Demo. [ Total Questions: 10] Web:

Exam : C : IBM InfoSphere Quality Stage v8 Examination. Title. Version : DEMO

CSCI 135 Exam #1 Fundamentals of Computer Science I Fall 2013

CSCI 135 Exam #2 Fundamentals of Computer Science I Fall 2013

1Z0-144 Q&As Oracle Database 11g: Program with PL/ SQL

Topic #9: Collections. Readings and References. Collections. Collection Interface. Java Collections CSE142 A-1

Oracle 1Z Java Certified Programmer. Download Full Version :

SUN Certified Programmer for J2SE 5.0 Upgrade. Download Full Version :

1B1a Arrays. Arrays. Indexing. Naming arrays. Why? Using indexing. 1B1a Lecture Slides. Copyright 2003, Graham Roberts 1

Java Collections Framework: Interfaces

Exam Name: Microsoft Enterprise Voice & Online Services with Microsoft Lync Server 2013

Object-Oriented Programming with Java

Oracle 1Z Java Standard Edition 6 Programmer(R) Certified Professional Upgrade.

Last Name: Circle One: OCW Non-OCW

Exam Name: VMware Certified Associate Network Virtualization

Microsoft. MS-101 EXAM Microsoft 365 Mobility and Security. m/ Product: Demo File

Exam Name: TS: Exchange Server 2007, Configuring

Java. Massimo Dong. November 27, Massimo Dong Java November 27, / 26

Set<Integer> s = new TreeSet<Integer>(); s.add( 7 ); s.add( 7 ); System.out.println( s.size() );

Exam Name: Microsoft Advanced Solutions of Microsoft Exchange Server 2013

OCJP 6_v.2013_vishal. Number: 1Z0-851 Passing Score: 800 Time Limit: 120 min File Version: 2013.

CS 101 Spring 2007 Midterm 2 Name: ID:

Birkbeck (University of London) Software and Programming 1 In-class Test Mar 2018

Class, Variable, Constructor, Object, Method Questions

Java Collections. Wrapper classes. Wrapper classes

Java Collections. Engi Hafez Seliem

Java Collections. Readings and References. Collections Framework. Java 2 Collections. References. CSE 403, Winter 2003 Software Engineering

Oracle Exam 1z0-808 Java SE 8 Programmer I Version: 6.0 [ Total Questions: 236 ]

Lesson 36: for() Loops (W11D1)

CIS 265 Exam 2 First Name Last Name

MODULE 6q - Exceptions

Class Libraries. Readings and References. Java fundamentals. Java class libraries and data structures. Reading. Other References

University of Palestine. Mid Exam Total Grade: 100

Interfaces, collections and comparisons

COURSE 4 PROGRAMMING III OOP. JAVA LANGUAGE

Exam Name: Microsoft Core Solutions of Microsoft SharePoint Server 2013

C212 Early Evaluation Exam Mon Feb Name: Please provide brief (common sense) justifications with your answers below.

Question: Total Points: Score:

Birkbeck (University of London) Software and Programming 1 In-class Test Mar Answer ALL Questions

CMPS 12A - Winter 2002 Midterm 2 March 5, Name: ID:

Classes and Objects 3/28/2017. How can multiple methods within a Java class read and write the same variable?

CMPS 290G Topics in Software Engineering Winter 2004 Software Validation and Defect Detection Homework 5

CIS 1068 Program Design and Abstraction Spring2016 Midterm Exam 1. Name SOLUTION

Transcription:

Vendor: Oracle Exam Code: 1Z0-851 Exam Name: Java Standard Edition 6 Programmer Certified Professional Exam Version: DEMO

QUESTION 1 Given a pre-generics implementation of a method: public static int sum(list list) { int sum = 0; for ( Iterator iter = list.iterator(); iter.hasnext(); ) { int i = ((Integer)iter.next()).intValue(); sum += i; return sum; What three changes allow the class to be used with generics and avoid an unchecked warning? (Choose three.) A. Remove line 14. B. Replace line 14 with "int i = iter.next();". C. Replace line 13 with "for (int i : intlist) {". D. Replace line 13 with "for (Iterator iter : intlist) {". E. Replace the method declaration with "sum(list<int> intlist)". F. Replace the method declaration with "sum(list<integer> intlist)". Answer: ACF QUESTION 2 A programmer has an algorithm that requires a java.util.list that provides an efficient implementation of add(0, object), but does NOT need to support quick random access. What supports these requirements? A. java.util.queue B. java.util.arraylist C. java.util.linearlist D. java.util.linkedlist Answer: D QUESTION 3 // insert code here private N min, max; public N getmin() { return min; public N getmax() { return max; public void add(n added) { if (min == null added.doublevalue() < min.doublevalue()) min = added; if (max == null added.doublevalue() > max.doublevalue()) max = added; 2

Which two, inserted at line 11, will allow the code to compile? (Choose two.) A. public class MinMax<?> { B. public class MinMax<? extends Number> { C. public class MinMax<N extends Object> { D. public class MinMax<N extends Number> { E. public class MinMax<? extends Object> { F. public class MinMax<N extends Integer> { Answer: DF QUESTION 4 import java.util.*; public class Explorer2 { public static void main(string[] args) { TreeSet<Integer> s = new TreeSet<Integer>(); TreeSet<Integer> subs = new TreeSet<Integer>(); for(int i = 606; i < 613; i++) if(i%2 == 0) s.add(i); subs = (TreeSet)s.subSet(608, true, 611, true); s.add(629); System.out.println(s + " " + subs); What is the result? A. Compilation fails. B. An exception is thrown at runtime. C. [608, 610, 612, 629] [608, 610] D. [608, 610, 612, 629] [608, 610, 629] E. [606, 608, 610, 612, 629] [608, 610] F. [606, 608, 610, 612, 629] [608, 610, 629] Answer: E QUESTION 5 public class Score implements Comparable<Score> { private int wins, losses; public Score(int w, int l) { wins = w; losses = l; public int getwins() { return wins; public int getlosses() { return losses; public String tostring() { 3

return "<" + wins + "," + losses + ">"; // insert code here Which method will complete this class? A. public int compareto(object o){/*more code here*/ B. public int compareto(score other){/*more code here*/ C. public int compare(score s1,score s2){/*more code here*/ D. public int compare(object o1,object o2){/*more code here*/ Answer: B QUESTION 6 public class Person { private name; public Person(String name) { this.name = name; public int hashcode() { return 420; Which statement is true? A. The time to find the value from HashMap with a Person key depends on the size of the map. B. Deleting a Person key from a HashMap will delete all map entries for all keys of type Person. C. Inserting a second Person object into a HashSet will cause the first Person object to be removed as a duplicate. D. The time to determine whether a Person object is contained in a HashSet is constant and does NOT depend on the size of the map. Answer: A QUESTION 7 import java.util.*; public class SortOf { public static void main(string[] args) { ArrayList<Integer> a = new ArrayList<Integer>(); a.add(1); a.add(5); a.add(3); Collections.sort(a); a.add(2); Collections.reverse(a); 4

System.out.println(a); What is the result? A. [1, 2, 3, 5] B. [2, 1, 3, 5] C. [2, 5, 3, 1] D. [5, 3, 2, 1] E. [1, 3, 5, 2] F. Compilation fails. H. An exception is thrown at runtime. Answer: C QUESTION 8 Given public interface Status { /* insert code here */ int MY_VALUE = 10; Which three are valid on line 12? (Choose three.) A. final B. static C. native D. public E. private F. abstract G. protected Answer: ABD QUESTION 9 class Atom { Atom() { System.out.print("atom "); class Rock extends Atom { Rock(String type) { System.out.print(type); public class Mountain extends Rock { Mountain() { super("granite "); new Rock("granite "); 5

public static void main(string[] a) { new Mountain(); What is the result? A. Compilation fails. B. atom granite C. granite granite D. atom granite granite E. An exception is thrown at runtime. F. atom granite atom granite Answer: F QUESTION 10 Click the Exhibit button. Which three statements are true? (Choose three.) A. Compilation fails. B. The code compiles and the output is 2. C. If lines 16, 17 and 18 were removed, compilation would fail. D. If lines 24, 25 and 26 were removed, compilation would fail. 6

E. If lines 16, 17 and 18 were removed, the code would compile and the output would be 2. F. If lines 24, 25 and 26 were removed, the code would compile and the output would be 1. Answer: BEF QUESTION 11 class Line { public class Point { public int x,y; public Point getpoint() { return new Point(); class Triangle { public Triangle() { // insert code here Which code, inserted at line 16, correctly retrieves a local instance of a Point object? A. Point p = Line.getPoint(); B. Line.Point p = Line.getPoint(); C. Point p = (new Line()).getPoint(); D. Line.Point p = (new Line()).getPoint(); Answer: D QUESTION 12 class Alpha { public void foo() { System.out.print("Afoo "); public class Beta extends Alpha { public void foo() { System.out.print("Bfoo "); public static void main(string[] args) { Alpha a = new Beta(); Beta b = (Beta)a; a.foo(); b.foo(); What is the result? A. Afoo Afoo B. Afoo Bfoo C. Bfoo Afoo D. Bfoo Bfoo 7

E. Compilation fails. H. An exception is thrown at runtime. Answer: D QUESTION 13 Click the Exhibit button. Which statement is true about the classes and interfaces in the exhibit? A. Compilation will succeed for all classes and interfaces. B. Compilation of class C will fail because of an error in line 2. C. Compilation of class C will fail because of an error in line 6. D. Compilation of class AImpl will fail because of an error in line 2. Answer: C QUESTION 14 Which two code fragments correctly create and initialize a static array of int elements? (Choose two.) A. static final int[] a = { 100,200 ; B. static final int[] a; static { a=new int[2]; a[0]=100; a[1]=200; 8

C. static final int[] a = new int[2]{ 100,200 ; D. static final int[] a; static void init() { a = new int[3]; a[0]=100; a[1]=200; Answer: AB QUESTION 15 interface Foo { int bar(); public class Sprite { public int fubar( Foo foo ) { return foo.bar(); public void testfoo() { fubar( // insert code here ); Which code, inserted at line 15, allows the class Sprite to compile? A. Foo { public int bar() { return 1; B. new Foo { public int bar() { return 1; C. new Foo() { public int bar() { return 1; D. new class Foo { public int bar() { return 1; Answer: C QUESTION 16 class Alligator { public static void main(string[] args) { int []x[] = {{1,2, {3,4,5, {6,7,8,9; int [][]y = x; System.out.println(y[2][1]); What is the result? A. 2 B. 3 C. 4 D. 6 E. 7 F. Compilation fails. Answer: E 9

Thank You for Trying Our Product Lead2pass Certification Exam Features: More than 99,900 Satisfied Customers Worldwide. Average 99.9% Success Rate. Free Update to match latest and real exam scenarios. Instant Download Access! No Setup required. Questions & Answers are downloadable in PDF format and VCE test engine format. Multi-Platform capabilities - Windows, Laptop, Mac, Android, iphone, ipod, ipad. 100% Guaranteed Success or 100% Money Back Guarantee. Fast, helpful support 24x7. View list of all certification exams: /all-products.html 10% Discount Coupon Code: ASTR14 10