32,199 Topics
| |
Demonstration of Linked list in java. Very simple and well commented java code for the beginners. Linked list of points are used to create a Polyline and display it More java codes at [URL="http://www.mycplus.com"]www.mycplus.com[/URL] | |
------------------------------------------------------------ [COLOR=Blue][B]Intro:[/B][/COLOR] This is a small program that measures the performance of given java classes. In snippet there are 2 classes: 1. TestClass.java contains all java classes that are being measured for performance, I've picked up Narue's Sorting Algorithms as AUT (application under test) 2. AJPerf.java: contains the aspect that … | |
Theres no doubting that using Java Swing is time consuming on load times. So heres a demo splash screen to keep your users captivated. You will need two classes for this example i.e. Splash.java and SplashWindow.java (remember line: 8 change this to match your splash image) just change the class … | |
Hi *, Here is a small program I had created to search for a given .class file within given CLASSPATH. It is primarily used in our project on test machines where lotsa ppl put lotsa patches in lotsa paths/jars and finally end up wondering which class file is being used. … | |
Java Code that creates a random number between 1 and 100 and then asks the user to guess the number and tells if the guess was too high, too low or, the right number. Loops until right number is guessed. | |
JAVA Date Utility ( This program Demonstrates the proper use of Date functionality in common java programming scenarios ) Date and Time | |
This prog uses SQL Server's Master Databases xp_cmdshell stored procedure (Shell Commands) to send messages in a LAN.Make Sure the driver name is 'netsend' and it points to Master Database. Check and change the username and passwords in the Java Program also.Make sure you have sufficient priviledges to execute stored … | |
This class implements a mechanism to encapsulate a selector. A selector is method signature descriptor. It is an easy way to create what may be called function pointers like in C language. I took my inspiration from Objective-C. | |
A program that can send mails. This requires that you have activation.jar and mail.jar in you classpath. | |
When this program is run it asks for the coordinate grid points, then it processes that and the result is the run rise and slope. | |
Use layers to create plots within a browser. Each point to be plotted is rendered via a layer (using the DIV tag). Mozilla/Firefox/IE seem to handle thousands of layers without any problem. Can attach event handler to each point for additional interactivity. Snippet example is housed within a JSP at … | |
This code demonstrates AVL insertion and deletion. The code was originally written in C by myself a little while back for a tutorial. The translation to Java was fairly trivial, and to add a little excitement I even threw in a few generics. Yes, I'm aware of this line: tree.data … | |
This small program simply allows the user to call two different methods passing along an interger value to each. One method will output numbers from zero utnil that integer value using iteration. The other method outputs numbers from zero to that integer using recursion. | |
Insertion sort, Selection sort, Bubble sort, Shell sort, Quicksort, and Heapsot. All optimized and ready to be experimented with. This is the framework for a Java application that speed tests various sorting algorithms (because there's usually little need to write one's own in production programs). Several popular algorithms were left … | |
A simplistic program to compute the volume of a cylinder when its radius and length are input via MyInput.class | |
A simple demonstration of how MyInput.class can be used to input data from the keyboard. Computation is then done to compute the interest rate on a mortage. | |
A short example of passing variables between methods (functions). | |
An example of method overloading. The program calls a function to get the square root of a number. The appropriate function (integer or double version) is executed. | |
The JOptionPane class is used to give the CompMortgage.java program a front-end GUI interface. The class is divided into numerous functions. | |
A program similar to ComputeMortgage.java utilizing a mathematical formula and multiple methods to calculate a loan payment. | |
A single class consisting of multiple methods is used to demonstrate the robustness of keyboard input in Java. A try-catch block is used. The program graphically prints out a square root table by using JTextArea, JScrollPane and JOptionPane. | |
A demonstration of introductory object oriented programming. A class to define a circle object with radius, area, and perimeter parameters. | |
This program consists of two functions in one class. It is the driver program for the CircleClass.java file. | |
A program similar to CircleClass.java which defines a rectangle object. ClientProgram.java is the driver program for the Rectangle.java file. | |
Two classes which aim to demonstrate private and public members of a class. A static variable is used as an accumulator to keep track of the number of class objects which are created. | |
A program combining a switch statement with static variables in a class. Based on the switch statement, a class object is dynamically created. | |
Nothing fancy, but I know many new programmers are often confused about recursion. Recursion simply is when a method calls itself. What MyTree does is it adds nodes to the root node, then that root node can be used to create a JTree. The populate() method reads in a list … | |
| |
Here is a code to sort numbers instead of strings using the BubbleSort method. The difference here is you don't use compareTo() for numbers as you do with strings. |
The End.