UNB/ CS/ David Bremner/ teaching/ old/ cs1083/ Java Programming Examples

Here is a collection of Java classes and snippets (partial class definitions or single method definitions). This is mainly intended to support students taking java programming classes from me.

Much of this code is not up to assignment standards because it has been kept terse to fit on overhead slides.

On the right you can find a list by tag.

2D array array binary file bitmap file image processing Comparable InputStreamReader Reader alias array binary tree buffered stream doubly-linked error handling exception factorial file hanoi linked list merge sort object object i-o parse puzzle queue recursion reverse selection sort serialize singly-linked sort sorting stack stream string text file

AccountTest.java

ArrayMerger.java

ArrayStack.java

ArrayStatic.java

BinarySearchList2.java

BinarySearchTree.java

BubbleSort.java

BucketSort.java

ByteIO.java

Catch.java

Catch2.java

Catch3.java

CheckingAccount.java

CircularQueue.java

ComparableNode.java

DataStreamTest.java

DecimalAccount.java

Dictionary.java

Dictionary2.java

Dictionary3.java

DoubleList.java

DoubleList2.java

DoubleNode.java

Factorial.java

FibTrace.java

FileCopy.java

FileCopy2.java

FileCopy3.java

FileCopy4.java

FileCopy5.java

Finally.java

Finally2.java

Finally3.java

Hanoi.java

IdStudent.java

ImageFormatException.java

InsertionSort.java

InsertionSort2.java

Link.java

LinkedQueue.java

LinkedStack.java

List.java

ListNode.java

ListTest1.java

ListTest2.java

Maze.java

MergeList.java

MergeSort.java

MyMergeSort.java

MyMergeSort2.java

Node.java

NumberLines.java

NumberLines2.java

ObjFact.java

PBM.java

PBM2.java

PBM3.java

PBM4.java

PBM5.java

PVReader.java

PVReader2.java

PVWriter.java

PVWriter2.java

PeopleVec.java

Person.java

PhoneList.java

PhoneNode.java

Prices1.java

Prices2.java

Propagate.java

Propagate2.java

Queue.java

QueueEmptyException.java

QueueFullException.java

QueueMaze.java

QueueTest.java

QuickSort.java

RETest.java

RecurseReverse.java

Rot13.java

RunLength.java

Sale1.java

Sale2.java

SavingsAccount.java

Scores1.java

Scores2.java

SelectionSort.java

SortTest.java

SortedList.java

StackMaze.java

StackMaze2.java

StaticSelectionSort.java

StopWatch.java

StreamTokenizerExample.java

StringParser2.java

StringTree.java

Student.java

TimeDepositAccount.java

Trace.java