Mcgraw.Hill.Scjp.&.Scjd.For.Java.2.Certification.Study.Guide.pdf
(
12957 KB
)
Pobierz
Part I
The Programmer’s
Exam
CHAPTERS
1
Language Fundamentals
6
Java.lang—The Math Class, Strings,
and Wrappers
2
Declarations and Access Control
7
Objects and Collections
3
Operators and Assignments
8
Inner Classes
4
Flow Control, Exceptions, and Assertions
9
Threads
5
Object Orientation, Overloading and
Overriding, Constructors,
and Return Types
Language
Fundamentals
CERTIFICATION OBJECTIVES
•
Java Programming Language Keywords
•
Literals and Ranges of All Primitive
Data Types
•
Array Declaration, Construction,
and Initialization
•
Using a Variable or Array Element
That Is Uninitialized and Unassigned
•
Command-Line Arguments to Main
✓
Two-Minute Drill
Q&A
Self Test
4
Chapter 1:
Language Fundamentals
T
his chapter looks at the Java fundamentals that you need to pass the Java 1.4
Programmer exam. Because you’re planning on becoming Sun certified, we assume
you already know the basics of Java, so this chapter concentrates just on the details
you’ll need for the exam. If you’re completely new to Java, this chapter (and the rest of the
book) will be confusing, despite our spectacularly cogent writing. That’s our story and we’re
sticking to it!
CERTIFICATION OBJECTIVE
Java Programming Language Keywords
(Exam Objective 4.4)
Identify all Java programming language keywords and correctly constructed identifiers.
Keywords
are special reserved words in Java that you cannot use as identifiers (names)
for classes, methods, or variables. They have meaning to the compiler; it uses them
to figure out what your source code is trying to do. Table 1-1 contains all 49 of the
reserved keywords.
Yo u
must
memorize these for the test; you can count on being asked to select the
keywords (and nonkeywords) from a list. Notice none of the reserved words have
Complete List of Java Keywords
TABLE 1-1
abstract
boolean
break
byte
case
catch
char
class
const
continue
default
do
double
else
extends
final
finally
float
for
goto
if
implements
import
instanceof
int
interface
long
native
new
package
private
protected
public
return
short
static
strictfp
super
switch
synchronized
this
throw
throws
transient
try
void
volatile
while
assert
5
Java Programming Language Keywords (Exam Objective 4.4)
capital letters; this is a good first step when weeding out nonkeywords on the exam.
You’re probably familiar with most of them, but we’ll review them anyway. Don’t
worry right now about what each keyword means or does; we’ll cover most of them
in more detail in later chapters.
Look for questions that include reserved words from languages other than
Java. You might see
include
,
overload
,
unsigned
,
virtual
,
friend
,
and the like. Besides appearing in questions specifically asking for keyword
identification, the “imposter” words may show up in code examples used
anywhere in the exam. Repeat after me, “
Java is not C++
.”
Access Modifiers
The following are access modifiers:
private
Makes a method or a variable accessible only from within its
own class.
■
protected
Makes a method or a variable accessible only to classes in the
same package or subclasses of the class.
■
public
Makes a class, method, or variable accessible from any other class.
■
Class, Method, and Variable Modifiers
The following are class, method, and/or variable modifiers:
abstract
Used to declare a class that cannot be instantiated, or
a method that must be implemented by a nonabstract subclass.
■
class
Keyword used to specify a class.
■
extends
Used to indicate the superclass that a subclass is extending.
■
final
Makes it impossible to extend a class, override a method, or
reinitialize a variable.
■
implements
Used to indicate the interfaces that a class will implement.
■
interface
Keyword used to specify an interface.
■
native
Indicates a method is written in a platform-dependent language,
such as C.
■
new
Used to instantiate an object by invoking the constructor.
■
Plik z chomika:
walbo48
Inne pliki z tego folderu:
McGraw.Hill.When.The.Market.Moves.Will.You.Be.Ready.pdf
(13662 KB)
McGraw.Hill.When The Market Moves, Will You Be Ready.pdf
(13662 KB)
McGraw.Hill.The.Ultimate.New.York.Body.Plan.eBook-TLFeBOOK.pdf
(5624 KB)
McGraw.Hill.Think.Like.Your.Customer.A.Winning.Strategy.to.Maximize.Sales.by.Understanding.How.and.Why.Your.Customers.Buy.chm
(3478 KB)
McGraw.Hill.The.Transparency.Edge.How.Credibility.Can.Make.Or.Break.You.In.Business.chm
(1218 KB)
Inne foldery tego chomika:
ksiazki
Schematy spawarek
Amaterske Radio_2009.rar
Pliki dostępne do 01.06.2025
Pliki dostępne do 19.01.2025
Zgłoś jeśli
naruszono regulamin