rent-now

Rent More, Save More! Use code: ECRENTAL

5% off 1 book, 7% off 2 books, 10% off 3+ books

9781420047929

Object Oriented Programming Through Java

by ;
  • ISBN13:

    9781420047929

  • ISBN10:

    1420047922

  • Format: Hardcover
  • Copyright: 2007-01-29
  • Publisher: CRC Press
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $100.00

Summary

Java language is the favourite platform of software developers. Using Java to advantage depends on learning to use its object oriented, platform independent, security concerned and graphic intensive features effectively. This book can be used by students of Computer Science and Information Technology who study Java programming as part of their curriculum. Readers interested in learning object oriented Java programming on their own will also find the book self-explanatory and interesting.

Author Biography

Dr P Radha Krishna is Associate Professor at Institute for Development and Research in Banking Technology, Hyderabad

Table of Contents

Prefacep. vii
Object Oriented Programmingp. 1
Introduction to OOPp. 1
Objects and Classesp. 2
Characteristics of OOPp. 4
Encapsulationp. 5
Inheritancep. 6
Polymorphismp. 8
Difference between OOP and Procedure Oriented Programmingp. 11
Summaryp. 11
Benefits of OOPp. 11
Drawbacks of OOPp. 12
Challenges of OOPp. 12
Objective type questionsp. 12
Exercisesp. 13
Answersp. 14
Introduction to Java Programmingp. 15
Introductionp. 15
Overview of Java technologyp. 15
A short history of the development of Javap. 18
Java as a new paradigm in programmingp. 19
Features of Javap. 19
Comparing Java and Other Languagesp. 22
Applications and Appletsp. 23
Simple applications using Javap. 23
Other applications and appletsp. 24
Java Development Kitp. 28
More Complex Programsp. 29
Java Source File Structurep. 30
Prerequisites for Compiling and Running Java Programsp. 31
Objective type questionsp. 32
Exercisesp. 32
Answersp. 32
Java Language Fundamentalsp. 33
The Building Blocks of Javap. 33
Lexical tokensp. 33
Literalsp. 34
White spacesp. 37
Commentsp. 38
Data Typesp. 39
Integral data typesp. 39
Floating-point numbersp. 40
Boolean data typesp. 40
Variable Declarationsp. 41
Declaring, initializing and using variablesp. 41
Variable types in Javap. 41
Object reference variablesp. 43
Default values for member variablesp. 44
Initializing local variables of different data typesp. 45
Initializing local reference variablesp. 46
Wrapper Classesp. 47
Operators and Assignmentp. 48
Operatorsp. 48
Assignmentp. 49
Mathematical operatorsp. 51
Relational operatorsp. 53
Logical operatorsp. 55
Bitwise operatorsp. 56
Shift operatorsp. 56
Ternary If-Else operatorp. 57
Comma operator+p. 58
String operator+p. 58
Operator precedencep. 58
Casting operatorsp. 59
Control Structuresp. 60
Blockp. 60
Loopp. 61
Branching statementsp. 68
Arraysp. 74
One-dimensional arraysp. 74
Multi-dimensional arraysp. 75
Stringsp. 77
Constructors of String class with character array and string objectp. 77
Constructors of String class with byte arrayp. 78
Methods of the String classp. 79
The StringBuffer Classp. 82
Constructors of the StringBuffer classp. 82
Objective type questionsp. 83
Exercisesp. 87
Answersp. 88
Java as an OOP Languagep. 89
Defining Classesp. 89
Creating instance and class variablesp. 89
Defining methodsp. 90
Knowing thisp. 92
Variable scope and method definitionsp. 94
Passing arguments to methodsp. 96
Class methodsp. 98
Overloading methodsp. 99
Constructor methodsp. 100
Inheritance, polymorphism and abstract classesp. 104
Overriding methodsp. 108
Finalizer methodsp. 112
Modifiersp. 113
Controlling access to methods and variablesp. 114
Method protection and inheritancep. 117
Creating accessor methodsp. 117
Class variables and methodsp. 119
Finalizing classes, methods and variablesp. 122
Abstract classes and methodsp. 123
Packagesp. 126
Using packagesp. 127
Using package and class names in fullp. 127
The import commandp. 128
Name conflictsp. 128
Creating packagesp. 129
Packages and class protectionp. 131
Interfacesp. 133
Interfaces and classesp. 133
Creating and extending interfacesp. 133
Other uses of interfacesp. 139
Objective type questionsp. 139
Exercisesp. 147
Answersp. 147
Exception Handlingp. 148
Introductionp. 148
Basics of Exception Handling in Javap. 150
Exception Hierarchyp. 152
Throwable class hierarchyp. 152
Constructors and Methods in Throwable Classp. 153
Constructorsp. 153
Methodsp. 154
Unchecked and Checked Exceptionsp. 155
Handling Exceptions in Javap. 155
Try blockp. 156
Catch blockp. 156
Finally blockp. 158
Multiple catch blocksp. 159
Nested try statementsp. 161
The keyword throwp. 162
Exception and Inheritancep. 163
Throwing User-defined Exceptionsp. 165
Redirecting and Rethrowing Exceptionsp. 167
Redirecting exceptions using throwsp. 167
Rethrowing an exceptionp. 170
Advantages of the Exception-Handling Mechanismp. 171
Objective type questionsp. 176
Exercisesp. 179
Answersp. 180
Multithreadingp. 181
Introduction: an Overview of Threadsp. 181
Creating Threadsp. 182
Creating a new thread extending Threadp. 182
Creating a thread implementing Runnable interfacep. 185
Stopping threads: the join() methodp. 187
Naming a threadp. 188
Thread Life-cyclep. 188
The newborn statep. 188
The runnable statep. 188
The running statep. 189
The dead statep. 190
The blocked statep. 190
Manipulating threadsp. 190
Thread Priorities and Thread Schedulingp. 192
setPriority and getPriorityp. 192
Time-slicingp. 192
The schedulerp. 192
Thread Synchronizationp. 193
Synchronized methodsp. 194
Synchronized statementsp. 196
Deadlocksp. 198
Daemon Threadsp. 198
Thread Groupsp. 199
Communication of Threadsp. 201
Sample Programsp. 206
Objective type questionsp. 210
Exercisesp. 212
Answersp. 212
Files and I/O Streamsp. 213
An overview of I/O Streamsp. 213
Java I/Op. 214
Character streamsp. 214
Byte streamsp. 216
Working with the I/O super-classesp. 217
File Streamsp. 220
FileInputStream and FileOutputStrearap. 222
Filter Streamsp. 224
DataInputStream and DataOutputStreamp. 225
PushbackInputStreamp. 227
RandomAccessFilep. 228
Serializationp. 230
Objective type questionsp. 233
Exercisesp. 235
Answersp. 236
Appletsp. 237
Introductionp. 237
JavaApplications Versus Java Appletsp. 239
Applet Life-cyclep. 239
The init() methodp. 241
The start() methodp. 241
The stop() methodp. 242
The destroy() methodp. 242
The paint() methodp. 242
Working with Appletsp. 243
Running the applet using AppletViewerp. 245
Running the applet using the web browserp. 246
The HTML APPLET Tagp. 248
Attributes in the applet tagp. 248
Passing parameters to appletsp. 249
The java.Applet packagep. 251
Sample Programsp. 253
Objective type questionsp. 259
Exercisesp. 261
Answersp. 261
Database Handling using JDBCp. 262
An Overview of DBMSp. 262
Database operationsp. 263
Database application architecturesp. 263
JDBC Architecturep. 266
Interfaces in JDBC APIp. 266
Types of database driverp. 267
Working with JDBCp. 267
Accessing a database using JDBCp. 267
Registering the driverp. 268
Connecting to the databasep. 268
Processing Queriesp. 270
The Statement classp. 271
Accessing rows returned from a queryp. 273
Accessing column datap. 273
The method PreparedStatementp. 277
The method CallableStatementp. 278
The Transactions Commit and Rollbackp. 279
Handling Exceptionsp. 280
Mapping Database Types to Javap. 281
Java format typesp. 281
Accessing Metadatap. 282
Methods in the class ResultSetMetadatap. 282
The class DatabaseMetadatap. 283
Sample Programs to Handle Databasesp. 284
Objective type questionsp. 294
Exercisesp. 296
Answersp. 297
The Abstract Window Toolkitp. 298
Introductionp. 298
Basic Classes in AWTp. 299
The class Graphicsp. 299
Coloursp. 299
Fontp. 300
Drawing with Graphics Classp. 300
Class Hierarchy of AWTp. 301
Event Handlingp. 302
Adapter classesp. 304
AWT Controlsp. 305
Labelsp. 305
Buttonsp. 305
CheckBoxp. 307
CheckboxGroup for creating Radio Buttonsp. 308
Choice controlp. 310
List controlp. 311
TextField controlp. 313
Scrollbarsp. 314
Layout Managersp. 315
The FlowLayout managerp. 316
The GridLayout managerp. 316
The BorderLayout managerp. 317
The CardLayout managerp. 318
The Java2D APIp. 319
Java2D Shapesp. 319
Texture paint and gradient paint:p. 323
Objective type questionsp. 327
Exercisesp. 329
Answersp. 329
Swingsp. 330
Introductionp. 330
The Swing Packagesp. 331
The Hierarchy of Swing Classesp. 332
JPopupMenup. 332
JDesktopPane and JInternalFramep. 336
Advanced Layout Managersp. 340
The BoxLayout managerp. 342
The GridBagLayout managerp. 343
Additional Swing Componentsp. 348
The Jlist classp. 348
The JcomboBox classp. 351
Constructing menusp. 354
The JTextArea classp. 359
The JTable controlp. 365
Customizing the frame and its look-and-feelp. 366
The JToolBar classp. 372
The JSlider controlp. 375
The JProgressBar classp. 378
Bordersp. 382
Objective type questionsp. 385
Exercisesp. 387
Answersp. 387
Servletsp. 388
Introductionp. 388
Advantages of servletsp. 389
Writing servletsp. 389
How to Run Servletsp. 391
Running HtmlToServletp. 392
The Life-cycle of the Servletp. 393
Instantiating and initializing a servlet-the init() methodp. 394
Handling client requests and responses-the service() methodp. 395
Destroying the Servlet-the destroy() methodp. 395
Servlet APIp. 396
Interfacesp. 397
Classesp. 397
The GenericServlet classp. 397
The HttpServlet classp. 398
Multi-tier Applications using JDBC from a Servletp. 404
Writing JDBC/Servletp. 404
A sample JDBC/Servlet applicationp. 406
Additional Capabilities of HTTP Servletsp. 408
Objects of the HttpServletRequest classp. 409
Objects of the HttpServletResponse classp. 409
Examples of GET and POST Requestsp. 410
Session Managementp. 412
Sample Programsp. 414
Objective type questionsp. 421
Exercisesp. 423
Answersp. 424
Networking and Remote Method Invocationp. 425
Introduction to Networkingp. 425
Understanding Portsp. 426
Networking Classes in the JDKp. 427
Basics of socketsp. 427
Simple client-server programmingp. 428
Reading from and writing to a socketp. 429
Introduction to RMIp. 432
RMI Architecturep. 433
Proxy layer or stub/skeleton layerp. 435
Remote reference layerp. 435
Transport layerp. 435
Implementing Remote Class and Interfacep. 435
Programming a clientp. 437
Programming a serverp. 437
Securityp. 439
Sample Programsp. 440
Objective type questionsp. 448
Exercisesp. 449
Answersp. 450
New Language Features of Java 1.5p. 451
Introductionp. 451
Genericsp. 452
The Enhanced for Loopp. 453
Autoboxing and Unboxingp. 455
Type-Safe Enumerationsp. 456
Variable-Length Argumentsp. 456
Formatted I/Op. 457
Static Importp. 458
Metadata (Annotations)p. 459
Sample Programsp. 460
Indexp. 467
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program