We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c583ac5 commit fcb673fCopy full SHA for fcb673f
arraylocation.java
@@ -0,0 +1,26 @@
1
+package arrayexample;
2
+
3
+public class arraylocation {
4
5
+ private double coords[];
6
7
+ public arraylocation(double[] coords){
8
9
+ this.coords= coords;
10
11
+ }
12
13
+ public static void main(String[] args) {
14
+ // TODO Auto-generated method stub
15
+ double[] coords={5.0, 0.0};
16
+ arraylocation accra= new arraylocation(coords);
17
+ coords[0]=32.9;
18
+ coords[1]=-117.2;
19
20
+ System.out.println(accra.coords[0]);
21
22
23
24
25
26
+}
0 commit comments