Tecnologia

Solo disponible en BuenasTareas
  • Páginas : 6 (1305 palabras )
  • Descarga(s) : 0
  • Publicado : 11 de septiembre de 2012
Leer documento completo
Vista previa del texto
Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

JCTV

1

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

JCTV

2

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

JCTV

3

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

JCTV

4

3/12/2007

Sun Certified Programmer for Java 2Study Guide

Tables and Figures

JCTV

5

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

JCTV

6

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

“Car extends Vehicle” means “Car IS-A Vehicle.” “Subaru extends Car” means “Subaru IS-A Car.”

JCTV

7

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

JCTV8

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

Modifiers and Access Modifiers

Local Variables

Variables (non-Local)

Methods final public protected private static abstract synchronized strictfp native

Classes

final

final public protected private static transient

public default

Final

Modifiers and Access Modifiers

Modifier

Class yes no yes no yes yesno no no no no

Variable yes yes yes yes yes no yes no yes yes no

Method yes yes yes yes yes yes yes yes no no yes

Constructor yes yes yes yes no no no no no no no

Free-Floating Block

public protected
(default)

no no yes no no no yes no no no yes

private final abstract static native transient volatile synchronized

JCTV

9

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tablesand Figures

Default Values for Array Elements
Array Type Default Value

byte char short int long float double Boolean Object reference

0 '\u0000' 0 0 0L 0.0F 0.0 false null

Java Primitive Data Types
Type Contains Default Size Min/Max Value

boolean true or false char byte short int long float

false

1 bit

N.A. N.A. \u0000 \uFFFF -27 -215 -231 -263 27 -1 215 -1 231 -1 263 -1

Unicode character\u0000 16 bits, two’s complement signed integer signed integer signed integer signed integer floating-point 0 0 0 0 0.0 0.0 8 bits, two’s complement 16 bits, two’s complement 32 bits, two’s complement 64 bits, two’s complement 32 bits, IEEE 754 64 bits, IEEE 754

+/-1.40239846E-45 +/-3.40282347E+38 +/-4.94065645841246544E-324 +/-1.79769313486231570E+308

double floating-point

Java EscapeSequences
Escape Sequence Unicode Equivalent Meaning

\b \t \n \f \r \" \' \\ \xxx

\u0008 Backspace \u0009 Horizontal tab \u000a Linefeed \u000c Form feed \u000d Carriage return \u0022 Double quote \u0027 Single quote \u005c Backslash \u0000 to \u00ff The character corresponding to the octal value xxx

JCTV

10

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

ClassMember Accessibility Modifier private default protected public same class yes yes yes yes Member Visibility same package subclass yes yes yes Universe

yes yes

yes

Class Member Accessibility Accessible to: Same class Class in same package Subclass in same package Subclass in different package Non-subclass, different package Member Visibility public protected package o private default yes yes yes yesyes yes yes yes yes yes yes yes yes

JCTV

11

3/12/2007

Sun Certified Programmer for Java 2 Study Guide

Tables and Figures

Java Operators
Prec. Operator Operand Type(s) Assoc. Operation Performed

1

2 3 4

5

6

7 8 9 10 11 12 13

++ arithmetic -arithmetic +, arithmetic ~ integral ! boolean (type) any *, /, % arithmetic +, arithmetic + string << integral >> integral >>> integral <, <=arithmetic >, >= arithmetic instanceof object, type == primitive != primitive == object != object & integral & boolean ^ integral ^ boolean | integral | boolean && boolean || boolean ?: boolean, any, any = variable, any *=, /=, %=, +=, -=, <<=, >>=, >>>=, &=, variable, any ^=, |=

pre-or-post increment (unary) pre-or-post decrement (unary) unary plus, unary minus bitwise complement (unary) logical...
tracking img