ICS 432 Fall 2024
Modules
Outcomes
Readings
Experiences
Assessments
Home
Modules
Java Threads
Sample Java source
Sample Java source code
Here are the programs from the lecture notes:
Simple examples showing how to use Java Threads:
SimpleThreadExample.java
: Two threads, one printing “#” and the other printing “.”
SimpleJoinExample.java
: Creating a new thread and waiting for it to be finished
DeferredCancellation.java
: Example of deferred cancellation (which doesn’t work!)
VolatileStress.java
: Program that quantifies the performance cost when using volatile
Simple examples showing how to use JavaFX
ButtonInFrameJavaFX.java
: A simple Button