The true beauty of the Java language is that it is 100% Object-Oriented. It's also extremely versatile, as a program written Java can easily be ported to almost any operating system and/or device. This is why I think it has a great future. Yes, Microsoft hates Java and Sun hates Microsoft, but remember that little OS called "Linux"... More and more people everyday are moving to Linux and maybe someday Microsoft will control LESS than 80% of the computer OS market. Anyway, here are some things ive written in Java. Please note that these may not be too complex, mainly because I'm still learning Java.
- LinkedList Example (linkedlist.zip) A linked list is a very dynamic data structure. The way it works can be confusing at first. Basically, all the elements in the list are "linked" together. Although Java already has a defined LinkedList class, I wrote this example for a student that was having trouble with a project. I don't expect you to download this code and actually use it. However, it's a good idea to take a look at it because it will teach you how linked lists work and possibly "improve your great programming skills" :)
- Thread Example (threadapp.txt) Multithreading is one of the biggest advantages Java has. Languages like Visual Basic don't offer options of creating new threads, but Java does. Multithreading is nothing new (it is also refered to as "multitasking"), but it can drastically speed up your program. This example isn't much, so I would recommend buying a book on multithreading if you really want to get into it. There are so many techniques for threading that an entire book can be written on just that. This example can just introduce you to the idea. (note: it is presented as a text file)
- File I/O (fio.txt) File Input and Output in Java is as simple as it is in Visual Basic. This file demonstrates a way to create a file and then read back from it. The code uses FileWriter, PrintWriter, FileReader, and BufferedRead to accomplish the task. I apologize for the absence of comments in the code. However, its pretty simple and you should get it fine without comments.
- HTML Highlighter (highlighter.zip) This simple program highlights text either in a text file or a website. By "highlighting", it will use html tags to change the background color and fore color of the text the user wants to highlight. It will then create a new html file that contains the text highlighted. It uses an htmlHighlighter class i wrote, that can easily be used in other programs. Hopefully by looking at the code, it can help you understand OOP better, or Java in general. (compiled with JDK1.3)