OCP Oracle Certified Professional Java SE 17 Developer Practice Tests - Jeanne Boyarsky - E-Book

OCP Oracle Certified Professional Java SE 17 Developer Practice Tests E-Book

Jeanne Boyarsky

0,0
28,99 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

Efficiently and effectively prepare for the OCP Java SE 17 certification exam In OCP Oracle Certified Professional Java SE 17 Developer Practice Tests: Exam 1Z0-829, a team of veteran Java developers helps you gain the confidence and knowledge you need to take the Oracle Certified Professional Java SE 17 Developer exam. Hundreds of domain-by-domain questions accompany complimentary online access to bonus questions, providing you with over 1000 practice questions and answers. You'll also get: * Access to Sybex's proven online interactive learning environment and test bank * Comprehensive coverage of every domain included on the OCP Java SE 17 Developer exam * Three complete bonus practice exams to help you gain confidence and develop proficiency in Java development This resource is perfect for anyone preparing to take Exam 1Z0-829. It also belongs on the bookshelves of novice and veteran Java programmers hoping to improve their on-the-job coding skills.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 777

Veröffentlichungsjahr: 2022

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Cover

Title Page

Copyright

Acknowledgments

About the Authors

About the Technical Editor

About the Technical Proofer

Introduction

Understanding the Exam

Who Should Buy This Book

Reviewing Exam Changes

Need More Help Preparing?

Bonus Content

Chapter 1: Handling Date, Time, Text, Numeric and Boolean Values

Chapter 2: Controlling Program Flow

Chapter 3: Utilizing Java Object-Oriented Approach

Chapter 4: Handling Exceptions

Chapter 5: Working with Arrays and Collections

Chapter 6: Working with Streams and Lambda Expressions

Chapter 7: Packaging and Deploying Java Code and Use the Java Platform Module System

Chapter 8: Managing Concurrent Code Execution

Chapter 9: Using Java I/O API

Chapter 10: Accessing Databases Using JDBC

Chapter 11: Implementing Localization

Chapter 12: Practice Exam 1

Chapter 13: Practice Exam 2

Chapter 14: Practice Exam 3

Appendix: Answers to Review Questions

Chapter 1: Handling Date, Time, Text, Numeric and Boolean Values

Chapter 2: Controlling Program Flow

Chapter 3: Utilizing Java Object-Oriented Approach

Chapter 4: Handling Exceptions

Chapter 5: Working with Arrays and Collections

Chapter 6:  Working with Streams and Lambda Expressions

Chapter 7: Packaging and Deploying Java Code and Use the Java Platform Module System

Chapter 8: Managing Concurrent Code Execution

Chapter 9: Using Java I/O API

Chapter 10: Accessing Databases Using JDBC

Chapter 11: Implementing Localization

Chapter 12: Practice Exam 1

Chapter 13: Practice Exam 2

Chapter 14: Practice Exam 3

Index

End User License Agreement

List of Tables

Introduction

TABLE I.1: Java 17 Professional Certification Exams

TABLE I.2: Oracle objectives and related study guide chapters

Guide

Cover

Table of Contents

Title Page

Copyright

Acknowledgments

About the Authors

About the Technical Editor

Introduction

Begin Reading

Appendix: Answers to Review Questions

Index

End User License Agreement

Pages

iii

iv

v

vii

ix

x

xi

xvii

xviii

xix

xx

xxi

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

181

182

183

184

185

186

187

188

189

190

191

192

193

194

195

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218

219

220

221

222

223

224

225

226

227

228

229

230

231

232

233

234

235

236

237

238

239

240

241

242

243

244

245

246

247

248

249

250

251

252

253

254

255

256

257

258

259

260

261

262

263

264

265

267

268

269

270

271

272

273

274

275

276

277

278

279

280

281

282

283

284

285

286

287

288

289

290

291

292

293

295

296

297

298

299

300

301

302

303

304

305

306

307

308

309

310

311

312

313

314

315

316

317

319

320

321

322

323

324

325

326

327

328

329

330

331

332

333

334

335

336

337

339

340

341

342

343

344

345

346

347

348

349

350

351

352

353

354

355

356

357

358

359

360

361

362

363

364

365

366

367

368

369

370

371

372

373

374

375

376

377

378

379

380

381

382

383

384

385

386

387

388

389

390

391

392

393

394

395

396

397

398

399

400

401

402

403

404

405

406

407

408

409

410

411

412

413

414

415

417

418

419

420

421

422

423

424

425

426

427

428

429

430

431

432

433

434

435

436

437

438

439

440

441

442

443

444

445

446

447

448

449

450

451

452

453

454

455

456

457

458

459

460

461

462

463

464

465

466

467

468

469

470

471

472

473

474

475

476

477

478

479

480

481

482

483

484

485

486

487

488

489

490

491

492

493

494

495

496

497

498

499

500

501

502

503

504

505

506

507

508

509

510

511

512

513

514

515

516

517

518

519

520

521

522

523

524

525

526

527

528

529

530

531

532

533

534

535

536

537

538

539

540

541

542

543

544

545

546

547

548

549

550

551

552

553

554

555

556

557

558

559

560

561

562

563

564

565

566

567

568

569

570

571

572

573

574

575

576

577

578

579

580

581

582

583

OCPOracle® Certified Professional Java SE 17 DeveloperPractice Tests

EXAM 1Z0-829

 

Jeanne Boyarsky

Scott Selikoff

 

 

Copyright © 2022 by John Wiley & Sons, Inc. All rights reserved.

Published by John Wiley & Sons, Inc., Hoboken, New Jersey.Published simultaneously in Canada.

ISBN: 978-1-119-86461-5ISBN: 978-1-119-86463-9 (ebk.)ISBN: 978-1-119-86462-2 (ebk.)

No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at www.wiley.com/go/permission.

Trademarks: WILEY, the Wiley logo, Sybex, and the Sybex logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. Oracle and Java are registered trademarks of Oracle America, Inc. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.

Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read. Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.

For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.

Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com.

Library of Congress Control Number: 2022937030

Cover image: © Jeremy Woodhouse/Getty ImagesCover design: Wiley

To the world reopening and many new adventures.

—Jeanne

 

In loving memory of my other mom, Dalene, for raising a talented daughter and partner, who fills me with happiness every day.

—Scott

Acknowledgments

Jeanne and Scott would like to thank numerous individuals for their contributions to this book. Thank you to Kezia Endsley and Archana Pragash for guiding us through the process and making the book better in many ways. Thank you to Janeice DelVecchio for being our technical editor as we wrote this book. Janeice pointed out many subtle errors in addition to the big ones. Thank you to Elena Felder for being our technical proofreader and finding the errors that we managed to sneak by Janeice. This book also wouldn't be possible without many people at Wiley, including Kenyon Brown, Pete Gaughan, Christine O'Connor, and many others.

Jeanne would personally like to thank everyone who put effort into resuming live events, including the DevNexus and KCDC conference leadership teams, the NYC/Hudson Valley FIRST robotics competition committee, and Joe Blay for making miracles happen in holding 694 team meetings. Scott was a great co-author, improving everything Jeanne wrote while writing his own chapters. A big thank you to everyone at CodeRanch.com, who asked and responded to questions and comments about our books. Finally, Jeanne would like to thank all of the new programmers at CodeRanch.com and FIRST robotics teams FRC 694 and FTC 310/479/8365 for the constant reminders of how new programmers think.

Scott could not have reached this point without his wife, Patti, and family, whose love and support make this book possible. He would like to thank his twin daughters, Olivia and Sophia, and youngest daughter, Elysia, for their patience and understanding and bringing daddy a cup of cold brew coffee when it was “time for Daddy to work in his office!” Scott would like to extend his gratitude to his wonderfully patient co-author, Jeanne, on this, their ninth book. He doesn't know how she puts up with him, but he's glad she does and is thrilled at the quality of books we produce. Finally, Scott would like to thank his mother, Barbara Selikoff (a retired teacher), for teaching him the value of education, and his father, Mark Selikoff, for instilling in him the benefits of working hard.

Both Jeanne and Scott would like to give a big thank-you to the readers of our books. Hearing from all of you who enjoyed the book and passed the exam is a great feeling. We'd also like to thank those who pointed out errors and made suggestions for improvements to our books. Radu Pana and Vlad Alin were the first to find any in our Java 17 Study Guide.

About the Authors

Jeanne Boyarsky was selected as a Java Champion in 2019 and is a leader of the NYJavaSIG. She has worked as a Java developer for more than 20 years at a bank in New York City where she develops, mentors, and conducts training. Besides being a senior moderator at CodeRanch.com in her free time, she works on the forum code base. Jeanne also mentors the programming division of a FIRST robotics team, where she works with students just getting started with Java. She also speaks at several conferences each year.

Jeanne got her Bachelor of Arts degree in 2002 and her Master's in Computer Information Technology degree in 2005. She enjoyed getting her Master's degree in an online program while working full time. This was before online education was cool! Jeanne is also a Distinguished Toastmaster and a Scrum Master. You can find out more about Jeanne at www.jeanneboyarsky.com or follow her on Twitter @JeanneBoyarsky.

Scott Selikoff is a professional software developer and author with over 20 years of experience developing full-stack database-driven systems. Skilled in a plethora of software languages and platforms, Scott currently works as a Staff Software Engineer at Google, specializing in Architecture and Cloud Services.

A native of Toms River, New Jersey, Scott achieved his Bachelor of Arts degree from Cornell University in Mathematics and Computer Science in 2002, after three years of study. In 2003, he received his Master of Engineering degree in Computer Science, also from Cornell University. As someone with a deep love of education, Scott has always enjoyed teaching others new concepts. Scott is a Leader of the Garden State Java User Group, helping to facilitate discussions and exchange of ideas within the community. He's also taught lectures at multiple universities and conferences.

Scott lives in New Jersey with his loving wife, Patti; three amazing daughters, twins Olivia and Sophia and little Elysia; a very playful dog, Georgette; and three silly cats, Snowball, Sugar, and Minnie Mouse. In his spare time, he plays violin in the Toms River Multigenerational Orchestra. You can find out more about Scott at www.linkedin.com/in/selikoff or follow him on Twitter @ScottSelikoff.

Jeanne and Scott are both moderators on the CodeRanch.com forums and can be reached there for questions and comments. They also co-author a technical blog called Down Home Country Coding at www.selikoff.net.

In addition to this book, Jeanne and Scott are authors of eight best-selling Java books:

OCA: Java 8 Programmer I Study Guide

(Sybex, 2015)

OCP: Java 8 Programmer II Study Guide

(Sybex, 2016)

OCA / OCP Java 8 Practice Tests

(Sybex, 2017)

OCP Java 11 Programmer I Study Guide

(Sybex, 2019)

OCP Java 11 Programmer II Study Guide

(Sybex, 2020)

OCP Java 11 Developer Complete Study Guide

(Sybex, 2020)

OCP Java 11 Practice Tests

(Sybex, 2021)

OCP Java 17 Developer Study Guide

(Sybex, 2022)

About the Technical Editor

Janeice DelVecchio has been a professional software developer for 12 years, and has had a lifelong love of programming and computers. Editing technical books is a fun task for her because she likes finding and fixing defects of all types.

In her day job she uses a very broad range of skills with technologies, including cloud computing, process automation, advanced unit testing, and DevOps. She also volunteers at CodeRanch.com, where she runs the Java class known as the Cattle Drive.

She is an expert with the Java programming language. If you ask her which language is the best, she will tell you that languages are tools and to pick the one that fits your use case. The first language she learned was BASIC, and one day she hopes to learn gaming development.

In her spare time, she enjoys cooking, solving puzzles, playing video games, and raising chickens. She loves eating sushi, drinking craft beer, and petting dogs—her guilty pleasure is ’80s pop music. She lives in Litchfield County, Connecticut.

About the Technical Proofer

Elena Felder got into Java development back when the language lacked even generics, and she is delighted that the language, its tooling, and its community have continued growing and adapting to successfully keep up with the ever-changing world. She proofread one of Jeanne and Scott’s first Java 8 Certification Study Guide chapters for fun and ended up doing it professionally ever since.

Introduction

OCP Oracle Certified Professional Java SE 17 Developer Practice Tests is intended for those who want to become a Java 17 Oracle Certified Professional (OCP) by taking the 1Z0-829 exam, as well as those who want to test their knowledge of Java 17. If you are new to Java 17, we strongly recommend you start with a study guide to learn all of the facets of the language and come back to this book once you are thinking of taking the exam.

We recommend the best-selling OCP Oracle Certified Professional Java SE 17 Developer Study Guide: Exam 1Z0-829 (Sybex, 2022), which we happen to be the authors of, to begin your studies. Unlike the questions in our study guide, which are designed to be harder than the real exam, the questions in this book mirror the exam format. All the questions in this book tell you how many answers are correct. They will say “Choose two” or “Choose three” if more than one answer is correct.

Regardless of which study guide you used to prepare, you can use this book to hone your skills, since it is based on topics on the actual exams.

Understanding the Exam

At the end of the day, the exam is a list of questions. The more you know about the structure of the exam, the better you are likely to do. For example, knowing how many questions the exam contains allows you to better manage your progress and time remaining. Table I.1 describes the overall structure of the exam.

TABLE I.1 Java 17 Professional Certification Exams

Exam Code

1Z0-829

Certification Title

Oracle Certified Professional: Java SE 17 Developer

Time Limit

90 minutes

Question Count

50 questions

Passing score

68%

For those good at math, that means you need to answer approximately 34 of the 50 questions correctly to pass. We say “approximately” because Oracle may include questions that they are testing out, which are unscored.

We recommend checking our blog in case Oracle changes this or there are any changes made to the 1Z0-829 Exam after these study guides were published.

www.selikoff.net/ocp17-pt

Java is now over 25 years old, celebrating being “born” in 1995. As with anything 25 years old, there is a good amount of history and variation between different versions of Java. For Java 17, Oracle has simplified things. Becoming an Oracle Certified Professional now requires passing only one exam, not two, and there are no Java 17 upgrade exams. Regardless of the previous certifications you hold, everyone takes the same, single Java 17 exam to become an Oracle Certified Professional.

Who Should Buy This Book

If you are looking to become a Java 17 Oracle Certified Professional, then this book is for you. It contains over 1,000 questions to help you prepare for the exam. We recommend using this book with our OCP Java SE 17 Developer Study Guide (Sybex, 2022). This book is about sharpening your knowledge of Java 17, while our study guide is about building it.

How This Book Is Organized

This book consists of 11 objective-based chapters followed by 3 full-length mock practice exams. There are some subtle differences between the objective-based chapters and practice exam chapters that you should be aware of while reading this book.

Using the Objective-Based Chapters

An objective-based chapter is composed of questions that correspond to an objective set, as defined by Oracle on the 1Z0-829 Exam. We designed the structure and style of each question in the objective-based chapters to reflect a more positive learning experience, allowing you to spend less time on each question but covering a broader level of material. For example, you may see two questions that look similar within a chapter but that contain a subtle difference that has drastic implications on whether the code compiles or what output it produces.

Just like the review questions in our study guide, these questions are designed so that you can answer them many times. While these questions may seem to be easier than exam questions, they will reinforce concepts if you keep taking them on a topic you don't feel strongly on.

In our study guides, we often group related topics into chapters or split them for understanding. For example, in our study guides we presented parallel streams as part of the concurrency chapter since these concepts are often intertwined, whereas the 1Z0-829 Exam splits concurrency and parallel streams across two separate objectives. In this book, though, the chapters are organized around Oracle's objectives so you can test your skills. While you don't need to read an entire study guide before using objective-based chapter in this book, you do need to study the relevant objectives.

Table I.2 shows what chapters you need to have read in our Java 17 study guide at a minimum before practicing with the questions in this book.

TABLE I.2 Oracle objectives and related study guide chapters

Chapter in This Book

Objectives

Study Guide Chapter

1

Handling Date, Time, Text, Numeric and Boolean Values

1, 2, 4

2

Controlling Program Flow

3

3

Utilizing Java Object-Oriented Approach

1, 3, 5, 6, 7, 8

4

Handling Exceptions

11

5

Working with Arrays and Collections

4, 9

6

Working with Streams and Lambda expressions

10, 13

7

Packaging and Deploying Java Code and Use the Java Platform Module System

12

8

Managing Concurrent Code Execution

13

9

Using Java I/O API

14

10

Accessing Databases Using JDBC

15

11

Implementing Localization

11

Some of our chapters have a lot of questions. For example, Chapter 3 contains more than 200 questions. This is based on how Oracle chose to organize its objectives. We recommend doing these larger chapters in batches of 30–50 questions at a time. That way, you can reinforce your learning before doing more questions. This also lets you practice with sets of questions that are closer to the length of the exam.

Taking the Practice Exams

Chapters 12, 13, and 14 of this book contain three full-length practice exams. The questions in these chapters are quite different from the objective-based chapters in a number of important ways. These practice exam questions tend to be harder because they are designed to test your cumulative knowledge rather than reinforcing your existing skillset. In other words, you may get a question that tests two discrete topics at the same time.

Like the objective chapters, we do indicate exactly how many answers are correct in the practice exam chapters, as is done on the real exam. Both practice exam chapters are designed to be taken within 90 minutes and have a passing score of 68 percent. That means you need to answer at least 34 questions correctly. Remember not to take the practice exam until you feel ready. There are only so many practice exams available, so you don't want to waste a fresh attempt.

While an objective-based chapter can be completed over the course of a few days, the practice exam chapters were each designed to be completed in one sitting. You should try simulating the exam experience as much as possible. This means setting aside 90 minutes, grabbing a whiteboard or scrap paper, and answering every question even if you aren't sure of the answer. Remember, there is no penalty for guessing, and the more incorrect answers you can eliminate, the better.

Reviewing Exam Changes

Oracle does change the number of questions, passing score, and time limit from time-to-time. Jeanne and Scott maintain a blog that tracks updates to the real exams, as quickly as Oracle updates them.

www.selikoff.net/ocp17-pt

We recommend you read this page before you take the real exam, in case any of the information has changed since the time this book was published. Although less common, Oracle does add, remove, or reword objectives. When this happens, we offer free supplemental material on our website as blog entries.

Need More Help Preparing?

Both of the authors are moderators at CodeRanch.com. This site is a quite large and active programming forum that is friendly toward Java beginners. It has a forum just for this exam called Programmer Certification.

www.coderanch.com/f/24

As you read the book, feel free to ask your questions in either of those forums. It could be that you are having trouble compiling a class or are just plain confused about something. You'll get an answer from a knowledgeable Java programmer. It might even be one of us!

Bonus Content

This book has a web page that provides all the questions in this book using Wiley's interactive online test engine.

You can link to this web page from www.wiley.com/go/sybextestprep.

Like all exams, the Java 17 Oracle Certified Professional (OCP) certification from Oracle is updated periodically and may eventually be retired or replaced. At some point after Oracle is no longer offering this exam, the old editions of our books and online tools will be retired. If you have purchased this book after the exam was retired, or are attempting to register in the Sybex online learning environment after the exam was retired, please know that we make no guarantees that this exam's online Sybex tools will be available once the exam is no longer available.

How to Contact the Publisher

If you believe you've found a mistake in this book, please bring it to our attention. At John Wiley & Sons, we understand how important it is to provide our customers with accurate content, but even with our best efforts an error may occur.

In order to submit your possible errata, please email it to our Customer Service Team at [email protected] with the subject line “Possible Book Errata Submission.”