Import text file as an array
in
Programming Questions
•
2 years ago
Hi all,
i have an array like this
Ball[] balls = {
};
and a text file like this
new Ball(147.789,134.801,26.9737),
new Ball(12.6074,83.0108,11.2267),
new Ball(175.982,161.524,27.2046),
new Ball(163.498,325.609,19.7859),
new Ball(115.718,310.419,4.00579),
new Ball(163.047,338.129,1.39272),
i would like to put the text file content into the code like this
Ball[] balls = {
new Ball(147.789,134.801,26.9737),
new Ball(12.6074,83.0108,11.2267),
new Ball(175.982,161.524,27.2046),
new Ball(163.498,325.609,19.7859),
new Ball(115.718,310.419,4.00579),
};
Is this possible???
thank you very much!
1