O

Object class, 103-112

clone method, 103, 104-106 equals method, 103, 107-109 finalize method, 103, 109-110, 257 getClass method, 103, 277 hashCode method, 103, 110-111 notify method, 103 notifyAll method, 103 toString method, 103, 111-112 wait method, 103 object creation operator, 53 object pools, implementing, 264 object reference accessing fields, 88 calling methods, 89 object serialization/deserialization, 496-508 custom, 501-505 default, 496-501 externalization, 506-508 ObjectlnputStream class, 497, 498 defaultReadObject method, 505 readObject method, 497, 498, 500, 507, 508

object-orientation inheritance, 97-116 interfaces, 125-136 polymorphism, 116-124 ObjectOutputStream class, 497

defaultWriteObject method, 505 writeObject method, 497, 498, 507 objects, 85-94 see also classes AccessibleObject class, 276 accessing fields, 87-89 calling methods, 89-92 collection, 315

creating objects and arrays, 85-87 encapsulation, 43 entities, 43

garbage collection, 92-93 initialization order, 78-82, 102 instantiation, 43

phantom reachable objects, 258 primitive types in Java, 47 reachable objects, 258 representing exceptions, 162-163 softly reachable objects, 258 strongly reachable objects, 258 template for manufacturing objects, 43 unreachable objects, 258 weakly reachable objects, 258 octal format integer literals, 50 toOctalString method, 255 of methods, EnumSet, 339 offer method

BlockingQueue interface, 396 Queue interface, 347 one-dimensional array, 47 open range/interval

SortedSet interface, 343 operands, 51

different types in operator, 56 operators, 51

addition operator, 51 array index operator, 51 assignment operator, 51 binary operator, 51 bitwise AND operator, 51 bitwise complement operator, 51 bitwise exclusive OR operator, 51 bitwise inclusive OR operator, 52 cast operator, 52

compound assignment operator, 52 conditional AND operator, 52 conditional operator, 52 conditional OR operator, 52 division operator, 52 equality operator, 52

inequality operator, 52 infix operator, 51 instanceof operator, 108 left shift operator, 53 logical AND operator, 53 logical complement operator, 53 logical exclusive OR operator, 53 logical inclusive OR operator, 53 member access operator, 53 method call operator, 53 multiplication operator, 53 new operator, 85-87 object creation operator, 53 operands of different types, 56 overflow/underflow, 56 overloading, 3 postdecrement operator, 53 postfix operator, 51 postincrement operator, 54 precedence, 55 predecrement operator, 54 prefix operator, 51 preincrement operator, 54 relational greater than operators, 54 relational less than operators, 54 relational type checking operator, 54 remainder operator, 54 signed right shift operator, 54 string concatenation operator, 51, 55 subtraction operator, 55 ternary operator, 51 unary minus operator, 55 unary operator, 51 unary plus operator, 55 unsigned right shift operator, 55 OptionalDataException, 498 or method, BitSet, 373 OR operators bitwise exclusive OR operator, 51, 374 bitwise inclusive OR operator, 52, 374 conditional OR operator, 52 logical exclusive OR operator, 53 logical inclusive OR operator, 53 ordinal method Enum class, 221 Four of a Kind game, 34 output

FileWriter class, 518-520 System.out, 9 Writer class, 513 writer classes, 512-513

output stream, 473 Output tab, NetBeans IDE, 16 outputList method, generics, 209 OutputStream class, 473, 475-476

methods, 475-476 OutputStreamWriter class, 514 getEncoding method, 515 write method, 514 overflow/underflow, operators, 56 overflows strictfp reserved word, 233 overloading annotating method override to detect, 101

constructors, 75 method overloading, 74 overloading operators, 3 overloading polymorphism, 116 @Override annotation, 191

annotating overriding method, 101 prefixing overriding methods, 102 overriding methods calling overridden methods, 101 incorrectly overriding method, 101 inheritance, 100 overriding final method, 101 prefixing overriding methods, 102

Was this article helpful?

0 0

Post a comment