Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Java Notes: Vectors

Vectors can hold only Objects and not primitive types (eg, int).

Tutorial Details:

Vectors (the java.util.Vector class) are commonly used instead of arrays, because they expand automatically when new data is added to them. The Java 2 Collections API introduced the similar ArrayList data structure. ArrayLists are unsynchronized and therefore faster than Vectors, but less secure in a multithreaded environment. The Vector class was changed in Java 2 to add the additional methods supported by ArrayList. See below for a reasons to use each. The description below is for the (new) Vector class.

Vectors can hold only Objects and not primitive types (eg, int). If you want to put a primitive type in a Vector, put it inside an object (eg, to save an integer value use the Integer class or define your own class). If you use the Integer wrapper, you will not be able to change the integer value, so it is sometimes useful to define your own class.


 

Rate Tutorial:
http://www.roseindia.net/java/java-tips/data/collections/lists/vectors.shtml

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Java Notes: Vectors

View Tutorial:
Java Notes: Vectors

Related Tutorials:

Java in a Nutshell Code Example
The Java programming examples shown here are from the book Java in a Nutshell , by David Flanagan, published by O\'Reilly & Associates.
 
JavaWorld - Java Tips index
JavaWorld - Java Tips index
 
Web services hits the Java scene, Part 1
Web services hits the Java scene, Part 1
 
The Java Web Services Tutorial
This tutorial is a beginner\'s guide to developing Web services and Web applications using the Java Web Services Developer Pack (Java WSDP).
 
Interface Tool for Java
Interface Tool for Java Interface Tool for Java is a tool that allows Java programs to communicate with ActiveX objects. It allows easy integration of ActiveX objects into a Java Environment
 
Java Floating License Enforcer Developer Package
Java Floating License Enforcer for Java Developer Package
 
JSmooth
JSmooth JSmooth creates standard Windows executable files (.exe) that smartly launch java applications.
 
Java 2D imaging for the Standard Widget Toolkit
Java 2D imaging for the Standard Widget Toolkit Bring the power of 2D imaging to your Eclipse plug-ins In this article, however, you'll learn how to have the best of both worlds. I'll demonstrate a simple technique that will allow you to paint Java
 
Java POS Software
Java POS Software Large retailers are increasingly turning to Java software to manage their retail enterprise.
 
Java Mime Magic Library
Java Mime Magic Library jMimeMagic is a Java library for determining the MIME type of files or streams.
 
Monitoring Local and Remote Applications Using JMX 1.2 and JConsole
Monitoring Local and Remote Applications Using JMX 1.2 and JConsole The latest release of Java, J2SE 5.0 (codenamed Tiger), adds core support for the Java Management Extensions (JMX) 1.2 into the Java standard libraries. This article walks you through h
 
Core Java Data Objects Excerpt
This book excerpt is from Core Java Data Objects,
 
Development Tool for Java-COM Bridge
What is Development Tool for Java-COM Bridge? Development Tool for Java-COM Bridge is a tool for developing and enabling tight communication between JavaTM- and COM-based applications. An application running on Microsoft Windows® systems is typically co
 
Object-Oriented Language: Java / APIs (Classes & Libraries)
The Java Platform APIs are a set of essential interfaces that developers need to build their Java applications and applets. All Java Platfrom APIs are open and extensible, and are created by JavaSoft and industry-wide specialists in each target technology
 
Java Resources
There are all Java freebies. Some of these are old, and not under maintenance. Download and use them at your risk. In case of queries, mail subrahmanyam_avb@technologist.com or varalakshmi_a@techie.com.
 
Tiger and Beyond, the Future of the Java Platform
Part Two of an interview with Sun Microsystems' Sun Fellow, Graham Hamilton, explores Java 2 Platform, Standard Edition 5.0 (J2SE 5.0) and the future of the Java language.
 
Welcome to Java Developers paradise!
Welcome to Java Developers paradise! T his site contains many quality Java, JSP, RMI, MySQL downloads, tutorials, source codes and links to other java resources. We have large number of links to the tutorials on java which will help you learn java
 
Collection of Large Number of Java Interview Questions!
Collection of Large Number of Java Interview Questions! Collection of Large Number of Java Interview Questions The Core Java Interview Questions The Jakarta Struts Interview Questions
 
Collection of Large Number of Java Sample Programs and Tutorials
Collection of Large Number of Java Sample Programs and Tutorials Collection of Large Number of Java Sample Programs and Tutorials HelloWorld Java Program Simple Java Program for beginners that prints HelloWorld! on console.
 
JPackIt JPackIt is a Java application for packaging a Java project into single executable package
Java Project in single jar, class or exe containing all java application resources and referenced libraries.
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.