8776814955 {177C130A} Java_ Classes in Java Applications_ An Introduction to Java Programming [Etheridge 2009].pdf

(2992 KB) Pobierz
David Etheridge
Java: Classes in Java Applications
– An Introduction to Java Programming
Download free ebooks at bookboon.com
2
Java: Classes in Java Applications – An Introduction to Java Programming
© 2009 David Etheridge & Ventus Publishing ApS
ISBN 978-87-7681-495-3
Download free ebooks at bookboon.com
3
Java: Classes in Java Applications
Contents
Contents
1.
1.1
1.2
2.
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
3.
3.1
3.2
3.3
3.4
3.5
Using the Java Application Programming Interface
Documentation in Developer-Written Java Classes
Documentation in the Java Application Programming Interface
Flow Control
Introduction to Flow Control
Sequential Flow
Conditional Flow
Making Decisions
Controlling the Repetition of Blocks of Code
Deciding Which Construct to Use
Branching Statements
Handling Exception Objects
Extending Classes by Means of Inheritance
What Does Inheritance Mean?
Overriding and Hiding Methods in a Subclass
Invoking a Parent Class Constructor from a Subclass Constructor
final and abstract Classes
What Does Type Compatibility Mean?
7
7
15
19
19
19
19
20
33
41
42
43
45
45
53
56
57
60
Fast-track
your career
Please click the advert
Masters in Management
Stand out from the crowd
Designed for graduates with less than one year of full-time postgraduate work
experience, London Business School’s Masters in Management will expand your
thinking and provide you with the foundations for a successful career in business.
The programme is developed in consultation with recruiters to provide you with
the key skills that top employers demand. Through 11 months of full-time study,
you will gain the business knowledge and capabilities to increase your career
choices and stand out from the crowd.
London
Business School
Regent’s Park
London NW1 4SA
United Kingdom
Tel +44 (0)20 7000 7573
Email mim@london.edu
www.london.edu/mim/
Applications are now open for entry in September 2011.
For more information visit
www.london.edu/mim/
email mim@london.edu or call +44 (0)20 7000 7573
Download free ebooks at bookboon.com
4
Java: Classes in Java Applications
Contents
3.6
3.7
3.8
4.
4.1
4.2
4.3
4.4
4.5
4.6
4.7
5.
5.1
5.2
5.3
5.4
5.5
6.
6.1
Virtual Method Invocation
Controlling Access to the Members of a Class
Summary of Inheritance
Errors in Java Programmes
Categories of Error
What are Unexpected Error Conditions?
Checked Exceptions
try … catch … finally Blocks
Throwing Exceptions
Exceptions in the Themed Application
Summary of Exceptions
Java Interfaces
What is a Java Interface?
Defining and Implementing a Java Interface
The Role of Interfaces as a Means to Introduce Behaviour to a Class
Interfaces as Types
Summary of Java Interfaces
Grouping Classes Together in a Java Application
An Introduction to Java Packages
64
65
68
70
70
71
73
82
84
87
92
93
93
97
101
103
106
107
107
© UBS 2010. All rights reserved.
Please click the advert
You’re full of
energy
and ideas
. And that’s
just what we are looking for.
Looking for a career where your ideas could really make a difference? UBS’s
Graduate Programme and internships are a chance for you to experience
for yourself what it’s like to be part of a global team that rewards your input
and believes in succeeding together.
Wherever you are in your academic career, make your future a part of ours
by visiting www.ubs.com/graduates.
www.ubs.com/graduates
Download free ebooks at bookboon.com
5
Zgłoś jeśli naruszono regulamin