OCA Java SE 8 Programmer I Certification Guide
eBook - ePub

OCA Java SE 8 Programmer I Certification Guide

Mala Gupta

Share book
  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

OCA Java SE 8 Programmer I Certification Guide

Mala Gupta

Book details
Book preview
Table of contents
Citations

About This Book

OCA Java SE 8 Programmer I Certification Guide prepares you for the 1Z0-808 with complete coverage of the exam. You'll explore important Java topics as you systematically learn what's required to successfully pass the test.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is OCA Java SE 8 Programmer I Certification Guide an online PDF/ePUB?
Yes, you can access OCA Java SE 8 Programmer I Certification Guide by Mala Gupta in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Programación en Java. We have over one million books available in our catalogue for you to explore.

Information

Chapter 1. Java basics

Exam objectives covered in this chapter
What you need to know
[1.2] Define the structure of a Java class. Structure of a Java class, with its components: package and import statements, class declarations, comments, variables, and methods. Difference between the components of a Java class and that of a Java source code file.
[1.3] Create executable Java applications with a main method; run a Java program from the command line; including console output. The right method signature for the main method to create an executable Java application. The arguments that are passed to the main method.
[1.4] Import other Java packages to make them accessible in your code. Understand packages and import statements. Get the right syntax and semantics to import classes from packages and interfaces in your own classes.
[6.4] Apply access modifiers. Application of access modifiers (public, protected, default, and private) to a class and its members. Determine the accessibility of code with these modifiers.
[7.5] Use abstract classes and interfaces. The implication of defining classes, interfaces, and methods as abstract entities.
[6.2] Apply the static keyword to methods and fields. The implication of defining fields and methods as static members.
[1.5] Compare and contrast the features and components of Java such as: platform independence, object orientation, encapsulation, etc. The features and components that are relevant or irrelevant to Java.
Imagine you’re setting up a new IT organization that works with multiple developers. To ensure smooth and efficient working, you’ll define a structure for your organization and a set of departments with separate responsibilities. These departments will interact with each other whenever required. Also, depending on confidentiality requirements, your organization’s data will be available to employees on an as-needed basis, or you may assign special privileges to only some employees of the organization. This is an example of how organizations might work with a well-defined structure and a set of rules to deliver the best results.
Similarly, Java has a well-defined structure and hierarchy. The organization’s structure and components can be compared with Java’s class structure and components, and the organization’s departments can be compared with Java packages. Restricting access to some data in the organization can be compared to Java’s access modifiers. An organization’s special privileges can be compared to nonaccess modifiers in Java.
In the OCA Java SE 8 Programmer I exam, you’ll be asked questions on the structure of a Java class, packages, importing classes, and applying access and nonaccess modifiers and features and components of Java. Given that information, this chapter will cover the following:
  • The structure and components of a Java class
  • Understanding executable Java applications
  • Understanding Java packages
  • Importing Java packages into your code
  • Applying access and nonaccess modifiers
  • Features and components of Java

1.1. The structures of a Java class and a source code file

[1.2] Define the structure of a Java class
Note
When you see a certification objective callout such as the preceding one, it means that in this section we’ll cover this objective. The same objective may be covered in more than one section in this chapter or in other chapters.
This section covers the structures and components of both a Java source code file (.java file) and a Java class (defined using the keyword class). It also covers the differences between a Java source code file and a Java class.
First things first. Start your exam preparation with a clear understanding of what’s required from you in the certification exam. For example, try to answer the following query from a certification aspirant: “I come across the term ‘class’ with different meanings: class Person, the Java source code file (Person.java), and Java bytecode stored in Person.class. Which of these structures is on the exam?” To answer this question, take a look at figure 1.1, which includes the class Person, the files Person.java and Person.class, and the relationship bet...

Table of contents