Tagged Questions

0
votes
2answers
27 views

Converting CSV file into 2D Array Java

I am having some trouble converting a CSV file into a 2D array in java. I might be going the longest way around this but I cannot seem to figure our why I am getting an error. Each row and column is ...
0
votes
1answer
41 views

saving entered String characters into a 2D array

I need some help,I do not know where I am getting the error here.. I need to save each character of the entered string in a 2D-Array.I also entered row and column number and the orientation ih ...
4
votes
3answers
58 views

Java, filling Object[][] array with data

I'm trying to fill an Object[][] array with data from my Object Class. However im having problems filling the array. Below is what I am trying to do to fill the Object[][] data. at the moment the ...
1
vote
1answer
43 views

How to copy a row from a 2d array to another

Hi I have a large 2D array (sample[1000][10]). I was wondering, how can I copy over the last row (1000) into a temp 2d array (temp[1][10])? EDIT: I have tried the following but I was wondering if ...
1
vote
3answers
36 views

getting the edge value of a 2D array while preventing getting out of bounds

I have 4x4 character array here and I need to get the common value of the character that is on the edge of the array...I tried the solutions from other questions similar to my problem, but I am still ...
0
votes
4answers
22 views

Hashset 2d array

I have a Hashset in which I store a list unique URLs. I want to make this a 2-d Hashset in which I have a unique list of URLs and a non unique number next to it. I then want to be able to search this ...
0
votes
0answers
26 views

Getting the value of the surrounding value in an a 2d array

Need help...I am trying to get the value below an element of a specific index in a 2d array..I followed the answers from other question but I just cant get it right.. here's my code... Character[][] ...
2
votes
2answers
96 views

word search in java 2d array

I am trying to create a simple word search for a class assignment, and I have managed to figure out how to search east (from left to right) and west(right to left). But I am having trouble trying to ...
1
vote
3answers
50 views

2D Array of ArrayLists null exception

I have a class that has an ArrayList attribute, and another class that has a 2D Array of that class: public class someThingsList { private List<someThings> lst; public someThingsList ...
1
vote
3answers
48 views

How to access each row in Triangular numbers?

Given triangular numbers are as follows: 4 5 3 9 2 21 1 46 12 8 .... upto n rows. Need to get the highest number from each row and sum it up. I'm not able to figure out where and how to put ...
2
votes
1answer
43 views

Java: In terms of localizing data for caches, are java multi-dimensional arrays Col-Major or Row-Major?

I found this topic, Similar Stack Overflow Thread In c++, when you make an array int[i][j] you get row major order, so iterating by row will give you caches which contain more useful data. In java, ...
-1
votes
2answers
156 views

Magic Square program help (Java) [closed]

This is homework for my AP Computer Science class dealing with 2D Arrays. Basically what the program does is input values into a Magic Square (all rows, columns, and diagonals add up to be the same ...
-5
votes
0answers
71 views

How to parse a 2d array in Java [closed]

So basicly I making the game Rush Hour in Java. I'm kind of stuck with it. I made a 2d array which reads levels from a txt file and places the values in the 2d array. My next step is to read the ...
1
vote
3answers
79 views

Sorting 2D-array as a whole

I have a 2D array to sort as a whole using Java. I have looked at the various links How to sort a two-dimension ArrayList using comparators. But it always sorts on a specific element. I want to ...
1
vote
2answers
71 views

How to display 2D array in GridView

I have 2D array: static final String[][] numbers = new String[][] {}; numbers[0][0] = "A"; numbers[0][1] = "b"; numbers[0][2] = "c"; numbers[1][0] = "d"; numbers[1][1] = "e"; ...

1 2 3 4 5 9
15 30 50 per page