Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Vlad Alin

Ranch Foreman
+ Follow
since Nov 01, 2021
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vlad Alin

Also on page 112
the following Shippable interface uses a generic type as the "argument" to its ship() method:

public interface Shippable<T> {
  void ship(T t);

it should be "parameter" instead of "argument" because when you declare a method is parameter and when you call it is argument.

For me it is a difference,but it is generic )
Sybex Java OCP 8 Study Guide Chapter 2 page 100 typo in explanation

"Which of the following are properties of classes that define immutable objects?
D. They mark all instance variables static."

"D is incorrect, as static METHODS are not part of the immutable object pattern."

In answer is instance variables,in explanation is methods.
by alinvlad05
Sybex Java OCP 8 Study Guide Chapter 2 page 99 missing fact
#11 question explanation
page 552 is explanation missing fact

B. caller(   (e) -> {"Poof"}   );

"B is incorrect because it does not use the return keyword."

Missing fact: Semicolon is required besides return keyword.

by alinvlad05
1: public interface CanClimb {
2:    public abstract void climb();
3: }
4: public interface CanClimbTrees extends CanClimb {}
5: public abstract class Chipmunk implements CanClimbTrees {
6:    public abstract void chew();
7: }
8: public class EasternChipmunk extends Chipmunk {
9:    public void chew() { System.out.println("Eastern Chipmunk is Chewing"); }
10: }

it should also say like #10 errata “What is the result of the following code?” should be “What is the result of the following code assuming each interface is a separate file.”
you can have just 1 public class/interface per file.
it is a small typo.
Also on page 94 in the last paragraph.
The singleton and immutable object patterns are both types of creational patterns, which are design patterns that facilitate the creation of objects WITH an application.

it should be WITHIN instead of WITH
Sybex Java OCP 8 Study Guide Chapter 2 page 83 typo

import java.util.*

is missing semicolon ; at the end
Sybex Java OCP 8 Study Guide Chapter 1 page 35 small typo
Exam Essentials

Methods are overloaded if they have the same method name but a different "argument" list.

It should say "parameter list" instead of "argument list".
When you define a method is parameter list.
When you use a method you type the "argument list".
Sybex Java OCP 8 Study Guide Chapter 1 page 63 small typo
It's an example about polymorphism.
Lemur lemur = new Lemur();
HasTail hasTail = lemur;
System.out.println(hasTail.age);// DOES NOT COMPILE

Typo: In this example, the reference hasTail has direct access only to methods defined "with" the HasTail interface;

It should be "within" instead of "with".