0% found this document useful (0 votes)
28 views

Oracle Certified Associate, Java SE 7 Programmer Study Guide - Errata

The document contains a list of errata for various pages in a publication. The errata include corrections to technical errors, language errors, layout issues, and code examples. The errata provide the page number, date, type of error, and correction that should be made for 18 different entries spanning multiple pages of the original publication.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Oracle Certified Associate, Java SE 7 Programmer Study Guide - Errata

The document contains a list of errata for various pages in a publication. The errata include corrections to technical errors, language errors, layout issues, and code examples. The errata provide the page number, date, type of error, and correction that should be made for 18 different entries spanning multiple pages of the original publication.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

- 18 submitted: last submission 20 Jul 2016

Errata type: Technical | Page number: 300 | Errata date: 30 Oct 2012

Under Answers to Chapter 6: The answer for Question 5 should be Option c and d not a and b

Errata type: Language | Page number: 11 | Errata date: 28 Dec 2012

Currently the page reads as follows:


The third principle is polymorphism and its primary concern is to make the application more maintainable and
extendable polymorphism behavior is where the behavior of one or identical methods is dependent upon the
object it is executing against.

It should Be:
The third principle is polymorphism and its primary concern is to make the application more maintainable and
extendable. Polymorphism behavior is where the behavior of one or identical methods is dependent upon the
object it is executing against.

Errata type: Layout | Page number: 17 | Errata date: 9 Jan 2012

Understanding the application in detail The following sections detail the significant aspects of the example
program.

Should be

Understanding the application in detail

The following sections detail the significant aspects of the example program.

Errata type: Language | Page number: 251 | Errata date: 9 Jan 2012

Java has provided an extensive set of classes to support exception handling in


Java.

Should be:

Java has provided an extensive set of classes to support exception handling.

Errata type: Technical | Page number: 275 | Errata date: 9 Jan 2012

Currently the page shows as:


class Exception A extends Exception {}
class Exception B extends A {}
class Exception C extends A {}
class Exception D extends C {}

It should be:

class A extends Exception {}


class B extends A {}
class C extends A {}
class D extends C {}

Errata type: Code | Page number: 205 | Errata date: 9 Jan 2012

Currently it shows as:


public Employee getInstance() {
Should be:

public static Employee getInstance() {

Errata type: Technical | Page number: 33 | Errata date: 5 Feb 2013

Currently the code is shown as:


javac com.company.customer.Customer.java
javac com.company.customer.CustomerDriver.java

It should be:

javac com\company\customer\Customer.java
javac com\company\customer\CustomerDriver.java

Errata type: Technical | Page number: 297 | Errata date: 5 Feb 2013

4. Given the following declaration:


StringBuilder sb = new StringBuilder;
Which of the following are valid uses of the sb variable?
a. sb.append(34.5);
b. sb.deleteCharAt(34.5);
c. sb.toInteger(3);
d. sb.toString();

Answer for this question is given as a,b and d. However, b is incorrect as


it passes a double value which deleteCharAt method does not accept. Hence, it
is invalid.

It should be:

Answer to this question should be a and d.

Errata type: Technical | Page number: 184 | Errata date: 5 Feb 2013

Currently the page is as below:

Question is as below:

4. Which of the following loops are equivalent?


a. for(String n : list) {
System.out.println(n);
}
b. for(int n = 0; n < list.size(); n++ ){
System.out.println(list.get(n));
}
c. Iterator it = list.iterator();
while(it.hasNext()) {
System.

Answer for this is given as :

"a, b, c, and d They are all equivalent."

It should be:
"a, b, and c They are all equivalent."
There is no option d in the question.
Errata type: Code | Page number: 77 | Errata date: 12 Feb 2013

Question 4:

StringBuilder sb = new StringBuilder;

should be

StringBuilder sb = new StringBuilder();

The correct answer should be a and d.

Errata type: Technical| Page number: 53 | Errata date: 27 Feb 2013

3._14_15F is an incorrect example for float literal. It should be 3.1_4_15F

Errata type: Technical| Page number: 55 | Errata date: 27 Feb 2013

In the list of Escape sequences from oracle documentation, \a and \v should be removed.
\xhh hexadecimal number should be: \0xhh hexadecimal number

Errata type: Technical| Page number: 63 | Errata date: 27 Feb 2013

Without the use of the cast operator in such situations, the compiler will issue a warning. The warning is there to
suggest that you look more closely at the assignments. The loss of precision may or may not be a problem,
depending upon the use of the data within the application. Without a cast operator, an implicit cast is made when
the code is executed.

Should be:

Without the use of the cast operator in such situations, the compiler will issue an error. The error is there to
suggest that you look more closely at the assignments. The loss of precision may or may not be a problem,
depending upon the use of the data within the application.

Errata type: Technical| Page number: 72 | Errata date: 27 Feb 2013

charAt: Returns the position of a character given an index in the string.

must be :

charAt: Returns the char value at the specified index.

Errata type: Technical| Page number: 80 | Errata date: 27 Feb 2013

hours ==35;

Should be

hours = 35;

Errata type: Layouts| Page number: 106| Errata date: 27 Feb 2013

Two floating point types are supported, float and double, with their precisions

shown in the following table. In addition, the Integer and Float classes are

wrapper classes for these two data types.

Should be:
Two floating point types are supported, float and double, with their precisions
shown in the following table. In addition, the Float and Double classes are
wrapper classes for these two data types.

Errata type: Technical| Page number: 147| Errata date: 27 Feb 2013

The ListIterator method returns a ListIterator object:

Should read:

The Listiterator method returns a Listiterator object:

Errata type: Technical| Page number: 183| Errata date: 27 Feb 2013

question 2

Given the following declaration of an array, which statement will display

each element of the array?

int arr[] = {1,2,3,4,5};

a. for(int n : arr[]) { System.out.println(n); }

b. for(int n : arr) { System.out.println(n); }

c. for(int n=1; n < 6; n++) { System.out.println(arr[n]);

d. for(int n=1; n <= 5; n++) { System.out.println(arr[n]);

The correct answer is b.

question 4

the response is

a, b, c, and d They are all equivalent.

It should read:

a, b and c They are all equivalent.

Errata type: Technical| Page number: 226| Errata date: 27 Feb 2013

The signature of a class is composed of

Should read:

The signature of a method is composed of

Errata type: Technical| Page number: 161 | Errata date: 27 Feb 2013

The first for loop should be for(int i = 0; i<5; i++) {


source[i] = 100;
}

The sentence:

"While we used a for-each to initialize the source array, we can only address a single array at a time."

Should be:

"In a for-each statement we are only able to address a single element of a single array or collection at a time."

Type: Technical | Page number: 300 | Date: 16 JUly 2013

In Chapter 7, the answer to The answer to Q.4 should be b and c.

Type: Technical | Page number: 54 | Date: 25 July 2013

There is a 1 extra in the following code line:

value & 0b0000_11111;

It should be value & 0b0000_1111;

Type: Technical | Page 29

"If an object has no references to it, it can be used or accessed even if the
garbage collector has not reclaimed it."

The sentence should read "If an object has no references to


it, it can NOT be used or accessed even if the garbage collector has not
reclaimed it."

Type: Code | Page: 99

pay = 40 * payRate + (hoursWorked - 40) * payRate;

Should be:

pay = 40 * payRate + (hoursWorked - 40)* 1.5 * payRate;

Errata Type: Technical Page NO: 137

The table shows:

Using the Arrays.copyOf method Performs a deep copy of the entire array
Using the Arrays.copyOfRange method Performs a deep copy of part of an array

It should show:

Using the Arrays.copyOf method Performs a shallow copy of the array


Using the Arrays.copyOfRange method Performs a shallow copy of the array

Errata Type: Typo | Page 247 |

The option for 3.D should be "None of the above" instead of "instanceOf".

The correct answer on page 300 question 3 should be C - "This method determines the type of an
object".
Errata Type: Typo | Page 300 |

The answer to Chapter 6 Question 3 should be B.

You might also like