I'm trying to get my data to populate the specific criteria but all I am getting when it prints out is ": : :".
Here is my code:
Code:import java.io.FileNotFoundException;
import java.io.IOException;
import com.csvreader.CsvReader;
public class SolarDateTime {
public static void main(String[] args) {
try {
CsvReader solar = new CsvReader("solar.txt");
solar.readHeaders();
while (solar.readRecord())
{
String y = solar.get("Year");
String m = solar.get("Month");
String d = solar.get("Date");
String t = solar.get("Time");
// perform program logic here
System.out.println(y + ":"+ m + ":" + d + ":" + t);
}
solar.close();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}

