Thanks for helping, Peggy
I'm not a Java beginner but as I've learned myself I have big knowledges in
some issues and some lacks in others.
Anyway, I have to create two data types:
1. an array of two Vectors
Vector name=new Vector();
Vector value=new Vector();
Object[] data=new Object[2];
data[0]=name;
data[1]=value;
data=servlet.CaptureHTTPData(requ); //a method created in a
class servlet
to //...capture another
servlet's data in actual servlet
//this method returns one object composed of two Vectors --> ¿will
it work that way?
2. an array composed of a String, and a two dimensional Vector (its for a
JDBC query, so I can't know the size)
String estate="";
Vector[][] queryresults=new Vector[][];
Object[] query=new Object[2];
query[0]=state;
query[1]=queryresults;
query=bd.JDBCquery(some paremeters) //a method created
in a class bd to do a JDBC query //this method returns one
object composed with the same elements than query
¿How do you see the code?
Regards,
OsKaR.
At 13.50 16/3/01 +0100, you wrote:
>Sorry, perhaps I do'nt understand you, or you begin programming in Java.
>
>I think you will build an array of different arrays, but perhaps you only
>want to build arrays?
>Show the following, i hope it will help
>
>
>I think there are many ways to solve your problem:
>
>first:
> perhaps the following situation
>
> Object[] myArrayOfArray = new Object[3];
> Object[] myObjectArray = new Object[arraySize];
>//or Object[] myObjectArray; and later the size //and Object[][]
>myObjectArray is possible to
> String[] myStringArray = new
>String[arraySize] //the same
> Vector[][] my2DimVector = new
>Vector[arraySize][arraySize]; //the same
>
> /**Build an Objectarray of Objects*/
> myArrayOfArray [0] = myObjectArray;
> myArrayOfArray [1] = myStringArray;
> myArrayOfArray [2] = my2DimVector;
>
> String sMyString = myArrayOfArray[0];
> Object oMyObject = my2DimVector[0][2];
>
>
>----------------------------------------------------------------------------
>----------
>
> perhaps the following situation
>
> for (int = 0; i < vStrings.size(); i++)
> {
> sMyString[i] = vStrings.elementAt(i);
>//so you can build an stringarray of elements from the vector
> }
>
>
>
>second: an Object with so many properties(objects) is a canditat for an new
>class!!!
>
> class myArrayOfArray
> {
> Object[] myObjectArray = new
>Object[arraySize];
> String[] myStringArray = new
>String[arraySize];
> Vector[][] my2DimVector = new
>Vector[arraySize][arraySize];
>
> ...
>
> get/set Methods
>
> ...
> }
>
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Oscar Pérez [SMTP:[EMAIL PROTECTED]]
> > Gesendet am: Freitag, 16. März 2001 12:35
> > An: [EMAIL PROTECTED]
> > Betreff: off topic - record type data
> >
> > Hi list,
> >
> > I want to create an array of objects (Object[]) with a String, an array of
> > ints (int[]) and a two dimensional Vector[][]. Is that possible? Can I
> > call
> > after, let's say, the 5th element of the ints array like
> > myObjectsArray[1][4]?
> >
> > Thanks in advance
> >
> > OsKar.
> >
> > __________________________________________________________________________
> > _
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html