HOME      
Most subjects
Fundamentals
Advanced
JSP, Servlets
Swing
J2ME        
EJB        
Eclipse IDE
JSF        
JavaScript Recently added or updated
Amazon Books
Java support is required, for
applets are used to show the lessons.

To find a subject, click here, then Ctrl-f

Java Fundamentals

Contents
Getting started
 
1.
Simplest
  • paint method
  • Graphics class, drawing
  • HTML APPLET tag
  • naming conventions
  • JVM
  • fully qualified names
2.
Compile and run
  • using Sun's SDK
  • javac
  • appletviewer
  • source file
  • class file
  • bytecodes
  • publishing applet
( Eclipse
Eclipse tips )
  • How to build and test Java software
  • using the Eclipse IDE
Excercise 1
Excercise 2
 
3.
API
  • packages
  • classes
  • methods
  • rt.jar
Excercise 3  
4.
Click
  • constructor
  • initializing
  • event handling
  • implementing the MouseListener interface
  • keyword 'this'
  • incrementing numeric instance variable
  • concatenating Strings
  • repaint
Excercise 4  
5.
Mouse Event
  • the MouseEvent argument
  • click coordinates
  • local variables
Excercise 5  
6.
new
TextArea
  • import
  • keyword 'new'
  • reference variable
  • AWT TextArea component
  • init method
  • new-line character
  • Applet hierarchy
  • adding to Container
Excercise 6  
7.
actionPerformed
Button Action
  • AWT Button
  • handling button event
  • ActionListener interface
  • changing button label
Excercise 7  
8.
if ... else
Button + TextArea
  • if ... else ...
  • statement block
  • boolean instance variable
  • conditional expression
Excercise 8  
9.
Two Buttons
  • handling multiple button events
  • ActionEvent source
  • comparing reference variables, ==
  • the Object superclass
Excercise 9  
10.
Data types, numeric limits
  • Fundamental data types
  • Numeric limits
Excercise 10  
11.
while
Repetition
  • while
  • local variables
  • casting
  • paint method
  • pseudo-random numbers
Excercise 11  
12.
Arrays, for
  • arrays
  • new, memory allocation
  • for
  • array .length
  • painting logic
Excercise 12  
13.
Calling methods
  • calling methods
  • parameter type, return type, void
  • return type as part of expression
  • method positions in class
Excercise 13  

14.
Continue
  • continue
15.
Break
  • break
  • NOT, AND, OR operators
  • switch case
Excercise 14  
Excercise 15  
16.
System, timing
  • current time
  • measuring elapsed time
  • System
Excercise 16  
16.5.
System properties
  • Environment variables
  • System.getProperty
  • System.out.println
16.7 (10.5)
Stand-alone, console application
  • java.util.Scanner
  • main
17.
Strings
  • String
  • 'changing' it
  • garbage collection
  • references
18.
String methods
  • String methods
Excercise 17  
19.
String splitting
  • StringTokenizer
20.
StringBuffer
  • string/character manipulation
Excercise 18  
21.
Instances 1
  • instance variables
  • null pointer
22.
Inheritance
  • Inherited methods
  • superclass, subclass
Excercise 19  

23.
Instances 2
  • Instance (inherited) data
24.
Construction
  • Constructors
  • Default constructor
  • Initialization
Excercise 21  
24.5.
Calculations
  • double, float, long,...
  • BigDecimal
  • Math methods
25.
Exceptions
  • try catch finally
  • order of catches
  • checked exceptions
  • array init
Excercise 22  
26.
Custom exception
  • Exception subclass
  • throw, throws
Excercise 23  
27.
Interfaces 1
  • ActionListener implementations
  • interface as data type
Excercise 24  
28.
Interfaces 2
  • Different components implementing same custom interface
  • interface as array data type

29.
Inner class
  • Adapter subclass as inner class
Excercise 25  
30.
Reference types
  • Superclass references
  • instanceof
Excercise 26  
31.
Static
  • static data/methods
  • constants, final
Excercise 27  
Excercise 28  
32.
Packages
  • Naming conventions
  • Directory structure
  • CLASSPATH
  • CODEBASE
  • jar files
Excercise 29  
33.
Access
  • public
  • private
  • protected
  • package
Excercise 30  
34.1
Overriding 1
 
34.2
Overriding 2
  • polymorphism
  • extending functionality
  • toString
Excercise 31  

35.
Abstract
  • subclassing abstract class
36.
Stand-alone application
  • main method
  • arguments
  • Frame
  • jar
  • Toolkit
  • System.exit
37.
Dates
  • Calculate difference between dates
  • GregorianCalendar
  • SimpleDateFormat
  • Date
  • cloning
Detailed information about the language, syntax, data types and much more
Sun's 1.5 API Documentation