C and C++ Programming Resources

Custom Search

Java

Demonstration of Linked list in java

Posted on October 31st, 2008 0 Comments

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 of...
Read More | Make a Comment

Stack Implementation in Java

Posted on October 30th, 2008 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...
Read More | Make a Comment

Stack implementation with array

Posted on September 28th, 2008 0 Comments

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 * * ...
Read More | Make a Comment

Photo

Posted on September 13th, 2008 0 Comments

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 * * ...
Read More | Make a Comment

Double buffering in Swing – Java

Posted on September 9th, 2008 0 Comments

An applet showing a red square that the user can drag with the mouse, on a background of lines. The user can drag the square off the applet and drop it. It will jump back to its starting point. This applet does uses double buffering, which is the default behavior in Swing. /******************************************************* * MYCPLUS Sample Code -...
Read More | Make a Comment

String Sorting

Posted on September 9th, 2008 0 Comments

String Sorting demonstration. /******************************************************* * MYCPLUS Sample Code - http://www.mycplus.com * * * * This code is made available as a service to our * * visitors and is provided strictly for the * * purpose of illustration. ...
Read More | Make a Comment

Demonstration of the try-catch-finally

Posted on September 9th, 2008 0 Comments

This is a demonstration of the try-catch-finally exception handling mechanism in java programming language. It shows different mechanisms on how to handle exceptions, catch errors and show error messages. /******************************************************* * MYCPLUS Sample Code - http://www.mycplus.com * * ...
Read More | Make a Comment

An applet for two-way chatting

Posted on September 9th, 2008 0 Comments

This applet supports two-way chatting between users. It implements a client for the ConnectionBroker server, which can set up a relayed connection between a pair of such clients. There are really two functions: The user can register with the server as a client who is willing to accept a connection, or the user can make a connection with one of the clients...
Read More | Make a Comment


Page 1 of 6123456