Page 1 of 1

Errata OCP 11 Study Guide

Posted: Sat Jan 04, 2020 10:24 pm
by nk2164
Deshmukh, Hanumant. OCP Oracle Certified Professional Java SE 11 Programmer I Exam Fundamentals 1Z0-815: Study guide for passing the OCP Java 11 Developer Certification Part 1 Exam 1Z0-815 (p. 66). Enthuware. Kindle Edition.

3.5 Exercise :

variable p2 is not declared in this below code .

Code: Select all

public class Person {
	int id;
	String name;
	java.util.Date dob;
	boolean VIP;

	public static void main(String[] args) {
		Person p1 = new Person();
		p2 = p1;
		int id = p2.id;
		p1.name = args[0];
	}

	public String getName() {
		return name;
	}
}

Re: Errata OCP 11 Study Guide

Posted: Sun Jan 05, 2020 2:30 am
by admin
You are right. Although not critical for the purpose of this particular exercise, it is a mistake. Added to errata.
thank you for your feedback!

Re: Errata OCP 11 Study Guide

Posted: Sun Jan 05, 2020 3:59 am
by nk2164
yes , i agree it is not that critical . Just wanted to report here so it can be corrected in a future update.