我有3个这样的数组:
String[] monthName = { "January", "February", "March",
"April", "May", "June", "July",
"August", "September", "October",
"November", "December" };
Double[] temperature = {68.1,69.1,72.4,75.7,79.6,82.4,83.7,83.6,82.4,78.8,74.4,69.9};
Double[] precipitation = {1.9,2.1,2.6,3.4,5.5,8.5,5.8,8.6,8.4,6.2,3.4,2.2};
我怎么能像这样打印这个值:
Climate Data
Location:
Month Temperature (F) Precipitation (in.)
*************************************************
Jan. 51.8 5.4
Feb. 54.8 4.6
Mar. 61.1 6.5
Apr. 66.4 3.6
May 74.4 5.0
Jun. 80.4 6.9
Jul. 82.4 8.0
Aug. 82.1 7.0
Sep. 78.9 5.0
Oct. 69.1 3.3
Nov. 60.4 3.9
Dec. 53.7 4.1
*************************************************