UNB/ CS/ David Bremner/ teaching/ 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 2D array Comparable InputStreamReader Reader alias array benchmark binary tree bitmap buffered stream doubly-linked error handling exception factorial file hanoi image processing linked list merge sort object object i-o o parse partially filled array puzzle queue recursion reverse selection sort serialize singly-linked sort sorting stack stream string text file

AccountTest.java

ArrayMerger.java

ArrayStack.java

ArrayStatic.java

ArrayUtil.java

BankAccount.java

BinarySearchList.java

BinarySearchList2.java

BinarySearchTree.java

Bitmap.java

BitmapReader.java

BitmapWriter.java

BubbleSort.java

BucketSort.java

ByteIO.java

Catch.java

Catch2.java

Catch3.java

CheckingAccount.java

CircularQueue.java

ComparableNode.java

ComparableSearch.java

ComparableTree.java

Computer.java

ComputerArray.java

CyberPetList.java

DataStreamTest.java

DecimalAccount.java

Dictionary.java

Dictionary2.java

Dictionary3.java

DollarAccount.java

DoubleList.java

DoubleList2.java

DoubleNode.java

EvalNumber.java

EvalNumber2.java

Factorial.java

FibTrace.java

FileCopy.java

FileCopy2.java

FileCopy3.java

FileCopy4.java

FileCopy5.java

Finally.java

Finally2.java

Finally3.java

FormatTest.java

GComparableNode.java

GenericNode.java

Hanoi.java

IdStudent.java

ImageFormatException.java

InsertionSort.java

InsertionSort2.java

IntPair.java

IntSelectionSort.java

Link.java

LinkedListMaze.java

LinkedQueue.java

LinkedStack.java

List.java

ListNode.java

ListTest1.java

ListTest2.java

MMSortTest.java

Maze.java

MazeTest.java

MergeComparable.java

MergeList.java

MergeSort.java

MergeSort3.java

MyMergeSort.java

MyMergeSort2.java

Node.java

NumberLines.java

NumberLines2.java

ObjArray.java

ObjFact.java

PBM.java

PBM2.java

PBM2a.java

PBM2b.java

PBM3.java

PBM4.java

PBM5.java

PVReader.java

PVReader2.java

PVWriter.java

PVWriter2.java

ParenParser.java

PeopleVec.java

Person.java

PhoneList.java

PhoneNode.java

Power.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

RunningAverage.java

Sale1.java

Sale2.java

SavingsAccount.java

Scores1.java

Scores2.java

SearchBench.java

SearchList.java

SearchTree.java

SelectionSort.java

SerialBitmap.java

SimpleNode.java

SortList.java

SortTest.java

SortedList.java

SortedList2.java

StackMaze.java

StackMaze2.java

StaticSelectionSort.java

StopWatch.java

StreamTokenizerExample.java

StringParser.java

StringParser2.java

StringTree.java

Student.java

Test.java

TimeDepositAccount.java

Trace.java

arrayprint1.java

catch1.java

catch2.java

catch3.java

handler1.java

handler2.java

randomPerm.java