Re: allocate array during run-time



Wizumwalt@xxxxxxxxx wrote:
I'm trying to allocate an IntBuffer during run-time once I know the
size I need but I can't get the following to compile. Eclipse
highlights the reason as such ...

[code]
Syntax error on token "]", VariableDeclaratorId expected after this
token.
[/code]

[code]
private IntBuffer[] indBuffers;

public void myMethod(int val) {
indBuffers[] = BufferUtils.newIntBuffer[val];
Leave out the [] - the name of the variable is just indBuffers.
// error in above line
...
[/code]

Mark
.



Relevant Pages

  • allocate array during run-time
    ... I'm trying to allocate an IntBuffer during run-time once I know the ... highlights the reason as such ... ... Syntax error on token "]", ...
    (comp.lang.java.programmer)
  • Re: New Eclipse offerings...
    ... John Adair wrote: ... stick with evolution. ... It's exactly that lack of a *single* reason to go with home broadband that ... One of the things with Eclipse is they've ...
    (uk.comp.sys.mac)
  • Eclipse behavior
    ... editor highlights syntax mistakes as one goes along. ... Is there any Eclipse configuration parameter to do this? ...
    (comp.lang.java.softwaretools)
  • Re: Comparing first 5 characters
    ... unfortunately it's giving me "Syntax error in JOIN ... and then it highlights the last instance of ... [Current Clients]. ... >Name],5) AS MatchMe ...
    (microsoft.public.access.queries)
  • Re: Orchid CwClient
    ... the 'top' of the window and one highlights the superfluous text ... The part I most dislike (and a reason that the ...
    (uk.telecom)