Demonstration of Linked list in java

This is a very simple demonstration of linked list in java programming language. Very nice and well commented java source code for beginners. User can “get” and “set” the list items as well as traverse through “previous” and “next ” items. This java program can create a linked list using one object or an array […]

By |Java|0 Comments

Stack Implementation in Java

An object of type IntStack is a stack of real numbers, with the standard stack operations push(int N), pop(), and isEmpty(). A makeEmpty() operation is also provided to remove all items from the stack.

Internally, the stack is implemented as a linked list.

/*******************************************************
* MYCPLUS Sample Code – http://www.mycplus.com […]

By |Java|0 Comments

Stack implementation with array

This java code basically implements stack functionality. It can Pop and Push an item in stack with the help of array. The item can only be an integer number and inernally the java program uses arrays to maintain items in stack.

/*******************************************************
* MYCPLUS Sample Code – http://www.mycplus.com *
* […]

By |Java|0 Comments

Photo

A small java program to show photo on JPanel. User can select any image file from the hard drive and show on the frame. Image file can be jpg, gif, bmp or any other supported graphics file.

/*******************************************************
* MYCPLUS Sample Code – http://www.mycplus.com *
* […]

By |Java|0 Comments

HighLow java Game

his program lets the user play HighLow, a simple card game that is described in the output statements at the beginning of the main() routine. After the user plays several games, the user’s average score is reported.

By |Java|0 Comments

Bank Operations using Threads in Java

Bank Operation demo that uses Bank, Clerk and Account and Transaction objects to complete the operation. Actually this demo shows how you can use threads to perform the tasks intheir own capicity and utilise the maximum system resopurces. What we do is, we have two clerks and they will do the work seperately from each […]

By |Java|0 Comments

Count the words in a file – Java

This program will read words from an input file, and count the number of occurrences of each word. The word data is written to an output file twice, once with the words in alphabetical order and once with the words ordered by number of occurrences. The input and output file names must be given […]

By |Java|4 Comments

Java applet – HighLow Game

This applet is a simple card game. The user sees a card and tries to predict whether the next card will be higher or lower. Aces are the lowest-valued cards. If the user makes
three correct predictions, the user wins. If not, the user loses.

This version […]

By |Java|1 Comment