This week's book giveaways are in the iOS and Features new in Java 8 forums. We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line! See this thread and this one for details.
I'm in the middle of completing my URLyBird 1.1.1 assignment and I need a clarification from you. I use Vector class for holding all the Room objects for displaying the Room details in the UI using JTable. I'm using Netbeans IDE for developing my assignment and it is showing a warning for the usage of Vector class. In the explanation about the warning it says:
"This inspection reports any uses of java.util.Vector or java.util.Hashtable. While still supported, these classes were made obsolete by the JDK1.2 collection classes, and should probably not be used in new development."
Though I couldn't see any warnings in the Java™ Platform Standard Ed. 6 API Javadoc, Is it ok for me to use the Vector class? will it be treated as a negative point for the grading?
Use of a Vector is legal but seems old fashioned. I do not know the specific grading criteria, but I wouldn't be surprised to learn that the graders look for mastery of the Collections API. Certainly, the latter supersedes most (and maybe all) routine uses of the Vector.
Vectors are "Synchronized" and can be used for this reason instead of ArrayList in some special case that nobody remember nor use. I think SCJD will help you to use correctly conccurent problem without falling in bad use of "synchronized" classes.
I used a simple ArrayList to hold my objects in my custom table model. But if you want to use Vector class, just go ahead, but I don't see any advantage which justifies using the Vector class in this situation.