#java
,Table of Contents
About 1
Chapter 1: Getting started with Java Language 2
Remarks 2
Java Editions and Versions 2
Installing Java 3
Compiling and running Java programs 3
What's next? 3
Testing 3
Other 3
Versions 4
Examples 4
Creating Your First Java Program 4
A closer look at the Hello World program 6
Chapter 2: 2D Graphics in Java 11
Introduction 11
Examples 11
Example 1: Draw and Fill a Rectangle Using Java 11
Example 2: Drawing and Filling Oval 13
Chapter 3: Alternative Collections 14
Remarks 14
Examples 14
Apache HashBag, Guava HashMultiset and Eclipse HashBag 14
1. Using SynchronizedSortedBag from Apache: 14
2. Using TreeBag from Eclipse(GC): 15
3. Using LinkedHashMultiset from Guava: 15
More examples: 16
Multimap in Guava, Apache and Eclipse Collections 16
Nore examples: 19
Compare operation with collections - Create collections 19
Compare operation with collections - Create collections 19
,Chapter 4: Annotations 25
Introduction 25
Syntax 25
Remarks 25
Parameter types 25
Examples 25
Built-in annotations 25
Runtime annotation checks via reflection 29
Defining annotation types 29
Default values 30
Meta-Annotations 30
@Target 30
Available Values 30
@Retention 31
Available values 32
@Documented 32
@Inherited 32
@Repeatable 32
Getting Annotation values at run-time 32
Repeating Annotations 33
Inherited Annotations 35
Example 35
Compile time processing using annotation processor 36
The annotation 36
The annotation processor 36
Packaging 38
Example annotated class 38
Using the annotation processor with javac 38
IDE integration 39
Netbeans 39
Result 39
, The idea behind Annotations 40
Annotations for 'this' and receiver parameters 40
Add multiple annotation values 41
Chapter 5: Apache Commons Lang 42
Examples 42
Implement equals() method 42
Implement hashCode() method 42
Implement toString() method 43
Chapter 6: AppDynamics and TIBCO BusinessWorks Instrumentation for Easy Integration 45
Introduction 45
Examples 45
Example of Instrumentation of all BW Applications in a Single Step for Appdynamics 45
*** Common variables. Modify these only. *** 45
Chapter 7: Applets 47
Introduction 47
Remarks 47
Examples 47
Minimal Applet 47
Creating a GUI 48
Open links from within the applet 49
Loading images, audio and other resources 49
Load and show an image 49
Load and play an audio file 50
Load and display a text file 50
Chapter 8: Arrays 52
Introduction 52
Syntax 52
Parameters 52
Examples 52
Creating and Initializing Arrays 52
Basic cases 52