Home
Tutorials
Core Java
Introduction To Java
Java Evolution
Overview of Java
Constants, Variables and Data Types
Java Operators
Branching Statements
Looping Statements
Classes, Objects and Methods
Inheritance
Array, String and Vectors
Java Interfaces
Java Packages
Applet Programming
Graphics Programming
Advanced Java
Java AWT
Java Event Handling
Java File Handling
Java MultiThreading
Java Swing-I
Java Swing-II
Exception Handling
Socket Programming
Java Database
Java RMI
Java Servlets
Java Beans
Programms
Projects
Downloads
Contact
Java Programming
!doctype>
Java Vectors
/* =========================================================== File Name : vectorclass.java WebSite : http://javaproglang.blogspot.in/ Facebook : https://www.facebook.com/AdvanceJavaProgramming Created By : Bintu Chaudhary =========================================================== */ import java.io.*; import java.util.*; class vectorclass { public static void main(String args[]) { Vector list = new Vector(); int l = args.length; for (int i=0; i < l; i++) { list.addElement(args[i]); } list.insertElementAt("Bintu",2); int s = list.size(); String larr[]=new String[s]; list.copyInto(larr); System.out.println("List of Elements"); for (int i=0; i < s; i++) { System.out.println(larr[i]); } } }
Output of "VectorClass.java"
Download Complete Program
-
Read more »
No comments:
Post a Comment
No comments:
Post a Comment