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

Color Selector

A custom component that lets the user select a color. The available colors are bright, saturated colors in a full range of hues. The possible colors are shown in a strip. The user clicks on this strip to select a color. The selected color is hilited with a white frame. A […]

By |Java|0 Comments

Calculator

A simple Java Calculator

By |Java|0 Comments

Blackjack Java Game

In this applet, the user plays a game of Blackjack. The computer acts as the dealer. The user plays by clicking “Hit!” and “Stand!” buttons.
The programming of this applet assumes that the applet is set up to be about 466 pixels wide and about 346 pixels high. That width is just big […]

By |Java|1 Comment

Read the URL – Java

This short program demonstrates the URL and URLConnection classes by attempting to open a connection to a URL and read text from it. The url must be specified on the command line. If an error occurs, a message is output. Otherwise, the text from the URL is copied to the screen.

By |Java|0 Comments