public class {
//these are the arrays I want to store the info in
public static int NumberOfTasks =0;
public static String taskNameArray[];
public static int taskNumberAray[];
public static String taskDescriptionArray[];
public static String developerDetailsArray[];
public static int taskDurationArray[];
public static String taskIDArray[];
public static String StatusArray[];
}
public satic void main(String[] args){
addTask(HowManyTasks);
}
public static void addTasks(int HowManyTasks){
//When I run the file i get an error that says Cannot store to object array because poe_part_2.Task.taskNameArray" is null
for(int i=0 ; i
Подробнее здесь: [url]https://stackoverflow.com/questions/78468574/i-want-to-write-the-input-from-a-method-int-an-array-using-a-for-loop-but-i-kee[/url]
//these are the arrays I want to store the info in
public static int NumberOfTasks =0; public static String taskNameArray[]; public static int taskNumberAray[]; public static String taskDescriptionArray[]; public static String developerDetailsArray[]; public static int taskDurationArray[]; public static String taskIDArray[]; public static String StatusArray[]; } public satic void main(String[] args){
addTask(HowManyTasks); }
public static void addTasks(int HowManyTasks){
//When I run the file i get an error that says Cannot store to object array because poe_part_2.Task.taskNameArray" is null