| You are here: | About>Computing & Technology>Focus on Java |
![]() | Focus on Java |
Create a LinkedListThe Java Collections Framework is chock full of useful abstract classes, interfaces, and concrete classes that you can use to handle your collections of stuff. Some of the classes you may be most interested in are the General-purpose Implementations like HashSet, ArrayList, and LinkedList. These are concrete classes that allow you to easily work with groups of common elements. For more information on LinkedList, check out this LinkedList Tutorial.
Thursday February 14, 2008 | permalink | comments (0) Java Acronyms GaloreHave you ever wondered what all of those acronyms stand for? You know the ones I'm talking about:
I have compiled a list of Java acronyms with their unabbreviated explanations. Sometimes I think people use acronyms just to confuse me, so I like to put on my detective hat and clear up these little mysteries. Call me Sherlock. Tuesday February 12, 2008 | permalink | comments (0) Autoboxing: A New Java 5 FeatureI must admit that I do not like the term "autoboxing", but I love the way it works. Autoboxing is a new feature of Java 5. If you haven't played around with Java 5, I highly suggest it. There are some cool new features (enums, generics, autoboxing) that you may find to be time-savers.
I am like most people. I do not like change, and when I start trying to compile programs that would have compiled correctly using a Java 1.4 compiler only to see weird error messages spewed onto my command line, I get a little upset. So, I take a deep breath, drink some strong coffee with tons of creamer, and I come back to my program and start researching the problem. That is how I discovered autoboxing. For a laid-back explanation, read on about how autoboxing works in Java 5. Thursday February 7, 2008 | permalink | comments (3) Sun Microsystems to Celebrate 500,000 CertificationsSun Microsystems is on the verge of hitting the half a million mark! Currently, there are approximately 480,000 Sun-certified professionals roaming the globe. Could you be the person to bring them to half a million? Either way, if you achieve a Sun Certification in February or March 2008 you will earn a free Sun certified t-shirt. And Sun offers two learning packages to help you on the way toward certification. For people who are looking for cost effective training, there is the eLearning Certification Success Package. This package offers web and CD-ROM training, a test voucher, and if purchased before March 31, 2008 it includes either a Swiss Army Field watch (I hope it comes in ladies sizes!) or a Solio universal hybrid charger. The second package is the Career Accelerator. It's a bit more costly, but it includes classroom training geared toward your certification of choice. No watches or universal chargers are included with the Career Accelerator package.
For more details about Sun's 500,000 Certifications see the announcement at Sun Microsystems. Tuesday February 5, 2008 | permalink | comments (0) Sun Tech Days Turns TenSun Tech Days is a travelling road-show that has been ongoing for the past ten years. The concept is to provide technical education in Java Technology and Solaris products. There are three tracks to choose from:
Thursday January 31, 2008 | permalink | comments (0) What's a Primitive Wrapper Class?It may sound like a course on the basics of gift-wrapping, but a primitive wrapper class is altogether different. If you recall your primitive data types (I know you have them taped to your forehead so you see them in the bathroom mirror) you'll remember that there are eight of these neanderthal data types:
This is unacceptable to object-oriented programmers. Everything must be an object! So, Java includes wrapper classes which essentially turn the primitive data types into real Java Objects. There is no class in Java called double... but there is a class called Double. Remember, Java is case-sensitive, so double does not equal Double. The Double class gives a little more pizzazz to the plain and boring double primitive data type. By using the Double class you can easily find out the minimum and maximum values you can hold in your Double object. You can parse your Double object into a String, and you can compare it to another Double object by using the compareTo() method. Wrapper classes empower the primitive data types by turning them into real objects. Tuesday January 29, 2008 | permalink | comments (2) A New Reserved Word: enumSo, I am happily coding along one day when I type in the following code:
I compile my code and I get an error message I have not yet seen:enum is a reserved keyword in Java 1.5. It cannot be used as an identifier.Well, that threw me for a loop! So I guess it's time to update the list of Java Reserved Words. Be careful with those enums! I recently upgraded to Java 6 from version 1.4, hence the funky error messages. Wednesday January 23, 2008 | permalink | comments (2) Java Array or Vector: What's the Difference?Arrays and Vectors in Java are quite similar. They both represent a collection of similar items. For example, a good usage of an array would be a variable called states ( as in the United States of America).
This is great for a collection of objects or primitive data types with an unchanging number of elements. We know that there are 50 states (I suppose that could change, but in general it is a fixed list). What do we do when we're not sure how many elements will be in our collection?Use a Vector! If you want to build a shopping list, you probably won't know how many items will be in the list, so a Vector would be great for this type of variable.
I can keep adding elements to myShoppingList without knowing ahead of time how many items there will be. Now that you have seen the code for Vectors, you can view some Java code with a String array here.
Monday January 21, 2008 | permalink | comments (2) Great Sites for the Java NewbieIf you have ever done a search for Java tutorials or introduction to Java, I have little doubt that your search was fruitless. In fact, there are thousands of sites in the nebulous web of information, but how do you find the one that will really help the beginner?
I have found a couple of places that have been quite helpful. When I was studying for certification, I visited the JavaRanch. It's an excellent place to learn the concepts, and the environment is friendly and welcoming. For more sites, such as the free online book Introduction to Programming Using Java, take a look at the Top 3 Sites for Beginning Java Programmers. Thursday January 17, 2008 | permalink | comments (0) Java ConstantsThere are two things in life that are constant.... death and taxes. In Java, unlike in life, you have control over what is constant and what is not. You can make variables constant with one word. And that word is (drumroll please)... "final".
The keyword final is a modifier that indicates that a variable is unchangeable, concrete, nonwavering, steady, fixed, however you want to describe it. It is constant and it will not change. But there are some conventions that go along with the usage of constants. For more information, read on about Java constants. Tuesday January 15, 2008 | permalink | comments (0) Display Latest Headlines | powered by WordPress |
|
All Topics | Email Article | | | ![]() |
| Advertising Info | News & Events | Work at About | SiteMap | Reprints | Help | Our Story | Be a Guide |
| User Agreement | Ethics Policy | Patent Info. | Privacy Policy | ©2008 About, Inc., A part of The New York Times Company. All rights reserved. |


