This code have something wrong, having error in return type.
public static []double convertLatLong(String lat, String lng) {
........
double latitude=....;
double longitude=....;
return (new []double{latitude,longitude});
}
But it works fine with…
public static double[] convertLatLong(String lat, String lng) {
........
double latitude=....;
double longitude=....;
return (new double[]{latitude,longitude});
}
So, what is difference between them?
While java supports declarations data_type [] var_name as well as data_type var_name [].
You asked: “So, what is difference between them? While java supports declarations data_type [] var_name as well as data_type var_name [].”
Compare carefully:
is to
AS
is to
while
has nothing in common with either of the function declarations (egads @ Jon)
Does that help?