For Programmers: Free Programming Magazines  


Home > Archive > Java Help > June 2005 > In Java,Is it possible to use array tpe with in Record type?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author In Java,Is it possible to use array tpe with in Record type?
priya

2005-06-04, 8:58 am

Hi,
In Java,Is it possible to use array tpe with in Record type?

Record Type:

{Variable=String;Variable=long}

like this

{Variable=int[];Variable=long[]}

Is this possible?

Boudewijn Dijkstra

2005-06-04, 3:57 pm

"priya" <priya11.karthik@gmail.com> schreef in bericht
news:1117870563.829182.42550@g43g2000cwa.googlegroups.com...
> Hi,
> In Java,Is it possible to use array tpe with in Record type?


What is a Record type?

> Record Type:
>
> {Variable=String;Variable=long}
>
> like this
>
> {Variable=int[];Variable=long[]}
>
> Is this possible?


What you just wrote is not Java.


Bryce

2005-06-06, 4:00 pm

On Sat, 4 Jun 2005 14:10:44 +0200, "Boudewijn Dijkstra"
<usenet@bdijkstra.tmfweb.nl> wrote:

>"priya" <priya11.karthik@gmail.com> schreef in bericht
>news:1117870563.829182.42550@g43g2000cwa.googlegroups.com...
>
>What is a Record type?


Java doesn't have Record Types. In C/C++/Pascal[1] they are
datastructures that contain just data (as opposed to data + methods as
Objects).

>
>What you just wrote is not Java.


Nope it is not. What I think the OP was trying to do was this:

class MyClass {
int[] intArray;
long[] longArray;
}

Maybe? Hard to tell as the OP didn't make much sense

--
now with more cowbell
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com