[PDF] [PDF] Getting Started with Java - MIT

This chapter presents an overview of the Java 2 class libraries and the Java 2 Platform editions □ Chapter 6, “Object-oriented programming in Java”



Previous PDF Next PDF





[PDF] Java Class Library

The original Collections framework just dealt with collections of Objects □ Everything in Java “is-a” Object so that way our collections framework will apply to 



[PDF] Java - Library Classes - Tutorialspoint

JAVA - LIBRARY CLASSES This tutorial would cover package java lang, which provides classes that are fundamental to the design of the Java programming 



[PDF] Java Libraries and Methods - McGill School Of Computer Science

Using Library Methods • Java Math example • Writing your own Methods • Void Methods libraries which contain classes and methods for you to use



[PDF] Core Libraries - Oracle Help Center

Java Core Libraries The core libraries consist of classes which are used by many portions of the JDK They include functionality which is close to the VM and is 



[PDF] JAVA LIBRARY CLASSES

Using library classes: String, Math, Color • Reading Slides Source: Objects First with Java - A Practical Introduction using BlueJ The Java class library



[PDF] Java Reference Library

A complete reference manual for the AWT-related packages in the core Java API Java Fundamental Classes Reference, by Mark Grand and Jonathan Knudsen



[PDF] Java Interface User Guide - Datalogics

The Adobe PDF Library is C-based, not Java-sourced, but as it is usable by any The Adobe PDF Library classes are in the packages com datalogics a pdf l jni



[PDF] Advanced Programming with Java The javalang package javalang

14 mar 2021 · set of class libraries The java lang package contains classes, interfaces, Object is the root class in Java: Everything is an Object Therefore 



[PDF] Getting Started with Java - MIT

This chapter presents an overview of the Java 2 class libraries and the Java 2 Platform editions □ Chapter 6, “Object-oriented programming in Java”



[PDF] Using Java Classes - Carnegie Mellon University School of

The Math class is one of many classes in the Java class libraries with predefined code It contains • mathematical constants and • methods that perform 

[PDF] java code conventions 2019 pdf

[PDF] java code examples

[PDF] java code to retrieve data from database

[PDF] java code to retrieve data from database and display in table

[PDF] java code to retrieve data from mysql database

[PDF] java coding exercises online

[PDF] java coding in hindi

[PDF] java coding standards 2019

[PDF] java coding standards 2020

[PDF] java coding standards and best practices

[PDF] java coding standards and best practices pdf

[PDF] java coding standards checklist

[PDF] java collection ppt

[PDF] java collections beginners book pdf

[PDF] java collections hands on

JBuilder

2005

Getting Started with Java

Borland Software Corporation

100 Enterprise Way

Scotts Valley, California 95066-3249

www.borland.com

Refer to the file deploy.html located in the redist directory of your JBuilder product for a complete list

of files that you can distribute in accordance with the JBuilder License Statement and Limited

Warranty.

Borland Software Corporation may have patents and/or pending patent applications covering subject matter in this document. Please refer to the product CD or the About dialog box for the list of applicable patents. The furnishing of this document does not give you any license to these patents. C OPYRIGHT © 1997-2004 Borland Software Corporation. All rights reserved. All Borland brand and product names are trademarks or registered trademarks of Borland Software Corporation in the United States and other countries. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. All other marks are the property of their respective owners. For third-party conditions and disclaimers, see the Release Notes on your JBuilder product CD.

Printed in the U.S.A.

JB2005gsjava 6E6R0804

0405060708-987654321

PDF i

Contents

Chapter 1

Introduction 1

Documentation conventions . . . . . . . . . . . . . 2 Developer support and resources. . . . . . . . . . . 4 Contacting Borland Developer Support . . . . . . 4 Online resources. . . . . . . . . . . . . . . . . . 4 World Wide Web. . . . . . . . . . . . . . . . . . 4 Borland newsgroups. . . . . . . . . . . . . . . . 4 Usenet newsgroups . . . . . . . . . . . . . . . . 5 Reporting bugs . . . . . . . . . . . . . . . . . . 5

Chapter 2

Java language elements 7

Terms . . . . . . . . . . . . . . . . . . . . . . . . . 7 Identifier . . . . . . . . . . . . . . . . . . . . . . 7 Data type . . . . . . . . . . . . . . . . . . . . . 8 Primitive data types. . . . . . . . . . . . . . . 8 Composite data types . . . . . . . . . . . . . 8 Strings . . . . . . . . . . . . . . . . . . . . . . . 9 Arrays . . . . . . . . . . . . . . . . . . . . . . . 9 Variable . . . . . . . . . . . . . . . . . . . . . . 9 Literal . . . . . . . . . . . . . . . . . . . . . . . 9 Applying concepts . . . . . . . . . . . . . . . . . .10 Declaring variables . . . . . . . . . . . . . . . .10 Methods . . . . . . . . . . . . . . . . . . . . . .10

Chapter 3

Java language structure 13

Terms . . . . . . . . . . . . . . . . . . . . . . . . .13 Keywords . . . . . . . . . . . . . . . . . . . . .13 Operators . . . . . . . . . . . . . . . . . . . . .14 Comments . . . . . . . . . . . . . . . . . . . . .15 Statements. . . . . . . . . . . . . . . . . . . . .16 Code blocks . . . . . . . . . . . . . . . . . . . .16 Understanding scope . . . . . . . . . . . . . . .16 Applying concepts . . . . . . . . . . . . . . . . . .17 Using operators . . . . . . . . . . . . . . . . . .17 Arithmetic operators . . . . . . . . . . . . . .18 Logical operators . . . . . . . . . . . . . . . .18 Assignment operators . . . . . . . . . . . . .19 Comparison operators . . . . . . . . . . . . .20 Bitwise operators . . . . . . . . . . . . . . . .21 ?:, the ternary operator . . . . . . . . . . . . .22 Using methods. . . . . . . . . . . . . . . . . . .22 Using arrays . . . . . . . . . . . . . . . . . . . .22 Using constructors. . . . . . . . . . . . . . . . .23 Member access . . . . . . . . . . . . . . . . . .24 Arrays. . . . . . . . . . . . . . . . . . . . . .24

Chapter 4

Java language control 25

Terms . . . . . . . . . . . . . . . . . . . . . . . . .25 String handling. . . . . . . . . . . . . . . . . . .25 Type casting and conversion. . . . . . . . . . . .26 Return types and statements . . . . . . . . . . .26

Flow control statements . . . . . . . . . . . . . .27Applying concepts . . . . . . . . . . . . . . . . . . 27

Escape sequences . . . . . . . . . . . . . . . . 27 Strings. . . . . . . . . . . . . . . . . . . . . 28 Determining access . . . . . . . . . . . . . . . 28 Handling methods . . . . . . . . . . . . . . . . 30 Using type conversions. . . . . . . . . . . . . . 30 Implicit casting. . . . . . . . . . . . . . . . . 30 Explicit conversion . . . . . . . . . . . . . . . . 31 Flow control. . . . . . . . . . . . . . . . . . . . 31 Loops . . . . . . . . . . . . . . . . . . . . . 31 Loop control statements. . . . . . . . . . . . 33 Conditional statements . . . . . . . . . . . . . . 33 Handling exceptions . . . . . . . . . . . . . . . 35

Chapter 5

The Java class libraries 37

Java 2 Platform editions . . . . . . . . . . . . . . . 37 Standard Edition . . . . . . . . . . . . . . . . . 37 Enterprise Edition . . . . . . . . . . . . . . . . 38 Micro Edition . . . . . . . . . . . . . . . . . . . 38 Java 2 Standard Edition packages. . . . . . . . . . 38 The Language package: java.lang . . . . . . . . 39 The Utility package: java.util . . . . . . . . . . . 40 The I/O package: java.io . . . . . . . . . . . . . 40 The Text package: java.text. . . . . . . . . . . . 40 The Math package: java.math . . . . . . . . . . 40 The AWT package: java.awt . . . . . . . . . . . 41 The Swing package: javax.swing. . . . . . . . . 41 The Javax packages: javax. . . . . . . . . . . . 41 The Applet package: java.applet . . . . . . . . . 42 The Beans package: java.beans . . . . . . . . . 42 The Reflection package: java.lang.reflect . . . . 42 XML processing . . . . . . . . . . . . . . . . . 43 The SQL package: java.sql. . . . . . . . . . . . 43 The RMI package: java.rmi. . . . . . . . . . . . 43 The Networking package: java.net . . . . . . . . 44 The Security package: java.security . . . . . . . 44

Chapter 6

Object-oriented programming in Java 59

Classes . . . . . . . . . . . . . . . . . . . . . . . 59 Declaring and instantiating classes. . . . . . . . 60 Data members . . . . . . . . . . . . . . . . . . 60 Class methods . . . . . . . . . . . . . . . . . . 60 Constructors and finalizers . . . . . . . . . . . . 61 Case study: A simple OOP example . . . . . . . 61 Class inheritance . . . . . . . . . . . . . . . . . 64 Calling the parent's constructor . . . . . . . . 66 Access modifiers . . . . . . . . . . . . . . . . . 67 Access from within class's package. . . . . . 67 Access outside of a package . . . . . . . . . 67 Accessor methods . . . . . . . . . . . . . . . . 68 Abstract classes . . . . . . . . . . . . . . . . . 70 Polymorphism . . . . . . . . . . . . . . . . . . . . 71 Using interfaces . . . . . . . . . . . . . . . . . 71 Adding two new buttons . . . . . . . . . . . . . 75 Running your application . . . . . . . . . . . . . 76 iiJava packages . . . . . . . . . . . . . . . . . . . . 76 The import statement . . . . . . . . . . . . . . . 77 Declaring packages . . . . . . . . . . . . . . . . 77

Chapter 7

Threading techniques 79

The lifecycle of a thread . . . . . . . . . . . . . . . 79 Customizing the run() method. . . . . . . . . . . 79 Subclassing the Thread class . . . . . . . . . 79 Implementing the Runnable interface . . . . . 80 Defining a thread . . . . . . . . . . . . . . . . . 82 Starting a thread. . . . . . . . . . . . . . . . . . 82 Making a thread not runnable . . . . . . . . . . . 82 Stopping a thread . . . . . . . . . . . . . . . . . 83 Thread priority . . . . . . . . . . . . . . . . . . . . 83 Time slicing . . . . . . . . . . . . . . . . . . . . 83 Synchronizing threads . . . . . . . . . . . . . . . . 84 Thread groups . . . . . . . . . . . . . . . . . . . . 84

Chapter 8

Serialization 85

Why serialize? . . . . . . . . . . . . . . . . . . . . 85 Java serialization . . . . . . . . . . . . . . . . . . . 85 Using the Serializable interface . . . . . . . . . . 86 Using output streams. . . . . . . . . . . . . . . . . 87 ObjectOutputStream methods. . . . . . . . . . . 88 Using input streams . . . . . . . . . . . . . . . . . 88 ObjectInputStream methods . . . . . . . . . . . 90 Writing and reading object streams . . . . . . . . . 90

Chapter 9

An introduction to the Java Virtual

quotesdbs_dbs4.pdfusesText_7