•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 373,579 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,856 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
•
•
•
•
•
•
•
•
The question how to create HTML output to the browser from a Servlet based on XML data often comes up.
Here's a fully functional example on how to achieve this using Jakarta Xalan 2 and Xerces 2.
The system is quite simple, most of the code is concerned with housekeeping chores rather than the... (View Snippet)
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 = heir.data;
But... (View Snippet)
This program generates the 6 faces of a colour cube.
The faces are displayed in a JPanel, and they are also saved to C:/Faces as PNG files.
So non-windows users might have to alter code slightly. (View Snippet)
This class will sort strings in alphabetical order. (View Snippet)
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. (View Snippet)
Seriously, what is any programming language without a HelloWorld app? (View Snippet)
Add n number of days to given date (View Snippet)
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. (View Snippet)
Validation whether a string can be parsed to a valid date according to a supplied formatting string (which should conform to the formatting rules as supplied in DateFormat).
This version can also flag dates in the past as error (we need that because many of our applications should accept only dates... (View Snippet)
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).... (View Snippet)