# Search:

Type: Posts; User: JanAlbertLam

1. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

i really can't make it work :((( sample codes please :(((((

--- Update ---

i really can't make it work :((( sample codes please :(((((
2. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

- how do i correct this? :(((
3. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

this is really wrecking my brain :((( it's jumbling in my head :((
4. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

import java.io.*;
public class MP2Num13
{
public static void main (String Args[]) throws IOException
{
int abc1=0;
int[] abc = new int[15];
int tot=0, n_count=1;
...
5. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

-for this instance, it should display this:
Numbers in the even indexes are:
1 3 5 7 9 1 3 5
The total stored in the odd indexes is: 26

--here, it displays all zeros :((
6. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

can you help me with syntax for that instance? HELPS WILL BE GREATLY APPRECIATED :(( THANKS
7. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

import java.io.*;
public class MP2Num13
{
public static void main (String Args[]) throws IOException
{
int[] abc = new int[15];
int tot=0, n_count=1;
8. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

it's not giving me the said error :(( I JUST NEED MORE HELP :((
9. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

this is my error:

MP2Num13.java:31: error: bad operand types for binary operator '+'
tot+=abc[x];

my version is 1.7.0
10. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

what exactly does that mean? :(

--- Update ---

i just tried., and it didn't work :((
11. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### Re: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

MP2Num13.java:13: error: incompatible types
^
required: int[]
found: int
MP2Num13.java:29: error: bad operand types for binary operator '+'
tot+=abc[x];...
12. ## Thread: WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

by JanAlbertLam
Replies
26
Views
498

### WHAT'S THE RIGHT CODES FOR ACCESSING ARRAYS?

import java.io.*;
public class MP2Num13
{
public static void main (String Args[]) throws IOException
{
int abc[15], tot=0, n_count=1;