Skip to content

Commit fcb673f

Browse files
committed
Added files via upload
1 parent c583ac5 commit fcb673f

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

arraylocation.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)