Skip to Content
Learning Java, 6th Edition
book

Learning Java, 6th Edition

by Marc Loy, Patrick Niemeyer, Daniel Leuck
August 2023
Beginner
552 pages
15h 14m
English
O'Reilly Media, Inc.
Content preview from Learning Java, 6th Edition

Appendix B. Exercise Answers

This appendix contains answers (and usually a bit of context) for the review questions at the end of each chapter. The code exercise answers are included with the source download for the example programs, in the exercises folder. Appendix A has details on obtaining the source and setting it up inside IntelliJ IDEA.

Chapter 1: A Modern Language

  1. Which company currently maintains Java?

    While Java was developed in the 1990s at Sun Microsystems, Oracle purchased Sun (and thus Java) in 2009. Oracle maintains ownership and is an active partner in the development and distribution of its own commercial JDK and the open source OpenJDK.

  2. What is the name of the open source development kit for Java?

    The open source version of the JDK is known as the OpenJDK.

  3. Name the two main components that play a role in Java’s approach to securely running bytecode.

    Java has many features that relate to security, but the main components at play in every Java application are the class loader and the bytecode verifier.

Chapter 2: A First Application

  1. What command should you use to compile a Java source file?

    If you are working in a terminal, the javac command compiles Java source files. While the details are often hidden when using an IDE like IntelliJ IDEA, the IDE is also using javac behind the scenes.

  2. How does the JVM know where to start when you run a Java application?

    Any executable Java class must have a main() method defined. The JVM uses this method as the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Head First Java, 3rd Edition

Head First Java, 3rd Edition

Kathy Sierra, Bert Bates, Trisha Gee
Learning Java, 4th Edition

Learning Java, 4th Edition

Patrick Niemeyer, Daniel Leuck

Publisher Resources

ISBN: 9781098145521Errata Page