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

Process Binary Trees – Java

This program demonstrates a few routines for processing binary sort trees. It uses a binary sort tree of strings. The user types in strings. The user’s string is converted to lower case, and — if it is not already in the tree — it is inserted into the tree. Then the number […]

By |Java|0 Comments

Dynamic array of integers

An object of class DynamicArrayOfInt acts like an array with unlimited size. The method put(position,value) is used to store the value at the specifed position in the array. There is no pre-set limit on how large position can be, although for very large values there would be problems with having enough […]

By |Java|0 Comments

Stars Applet

Stars Applet that show some stars on the applet windows.

By |Java|0 Comments

Client Server in Java

Set up a Server that will receive packets from a client and send packets to a client. Also set up a Client that will send packets to a server and receive packets from a server.
/*******************************************************
* MYCPLUS Sample Code – http://www.mycplus.com *
* […]

By |Java|1 Comment