EDITED to remove excess code and show the exact errors I am receiving.
I am attempting to show my array in a grid format (like a spreadsheet). I have declared it an array of strings, so that I can use readLine and split however 6 out of 7 columns are doubles. I keep getting incompatible types errors on all of the array variables. More specifically: Incompatible types: int cannot be converted to string, incomparable types int and string and incompatible types string cannot be converted to double I am new and when I researched on here, I couldn't find how to fix this. Here is my code:
while(s != null) {
array = s.split(delimiter);
dates = array[0];
dates = Integer.parseInt(array[0]);
double[] nums = new double[array.length];
for (int i = 0; i < nums.length; i++) {
nums[i] = Double.parseDouble(array[i]);
}
if(dates != 0) {
open = array[1];
high = array[2];
low = array[3];
close = array[4];
adjClose = array[5];
volume = array[6];
open = Double.parseDouble(array[1]);datesvariable (dates = array[0]), then immediately replace it with something else (dates = Integer.parseInt(array[0]))? If text stored inarray[0]is supposed to be an integer number, why isdatestypeString, and not typeint? If you know thatarray[0]is not adoublevalue, why does your loop callingparseDouble()start at index 0? If you already parsed all the values todouble, why are you trying to assignarray[1]toopen, notnums[1]? Same question for indexes 2-6?Stringdoesn't become adoublejust because you've assigned aStringvalue to adoublevariable.