Re: allocate array during run-time
- From: Mark Thomas <anon>
- Date: Wed, 26 Apr 2006 20:24:01 +0100
Wizumwalt@xxxxxxxxx wrote:
I'm trying to allocate an IntBuffer during run-time once I know theLeave out the [] - the name of the variable is just indBuffers.
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];
// error in above lineMark
...
[/code]
.
- References:
- allocate array during run-time
- From: Wizumwalt@xxxxxxxxx
- allocate array during run-time
- Prev by Date: Re: Java in Sudoku boards
- Next by Date: Re: Kudos to Oliver
- Previous by thread: allocate array during run-time
- Next by thread: Re: allocate array during run-time
- Index(es):
Relevant Pages
|