-
how move my string array in vector
hi master
sir i have string array how i add that array in vector
i tried flowing code
but not give me restul
String[] jlf = {"Muhammad","Fahim","Aamir"};
vector.addElement(jlf);
plsease give me idea how i add array in vector
thank
aamir
-
That you are doing should work ... as long as you are creating a vector object and then adding your String array to that vector object, such as:
Vector myVector = new Vector();
myVector.addElement(jlf);
This is a place where you could use "Generics" in declaring your vector as holding elements which are arrays of Strings, to allow the compiler to do type checking for you when adding elements to the vector:
Vector<String[]> myVector = new Vector<String[]>();
-
how i fill the combobox with vector
thank for your reply
hi master
sir how use vector in combobox
or how i fill the combobox with vector
thank
aamir
-
Amir needs to copy the contents of an array to a vector!
String[] strs = new String[]{"a", "b"};
Vector v = new Vector();
v.addAll(Arrays.asList(strs));
Now the vector is filled with strings "a" and "b".
JList list = new JList(v); // will work
Similar Threads
-
By Marcos in forum VB Classic
Replies: 3
Last Post: 01-25-2006, 11:18 AM
-
By Shaitan00 in forum Java
Replies: 1
Last Post: 02-28-2005, 09:58 AM
-
By mdengler in forum ASP.NET
Replies: 0
Last Post: 11-26-2002, 02:32 PM
-
By Gastao Woelfert in forum VB Classic
Replies: 2
Last Post: 09-01-2000, 11:36 AM
-
By Chandra in forum VB Classic
Replies: 0
Last Post: 06-22-2000, 12:52 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks