JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Java 新手區  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Re:java.lang.String,int,int,int??? [Re:Wayne]
lonely741215

數學才是王道



發文: 196
積分: 0
於 2012-12-29 17:45 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
public class OutClass { 
// Inner Class 
private class Point { 
private int x, y; 
 
public Point() { 
x = 0; y = 0; 
} 
 
public void setPoint(int x, int y) { 
this.x = x; 
this.y = y; 
} 
 
public int getX() { 
return x; 
} 
 
public int getY() { 
return y; 
} 
} 
 
private Point[] points; 
 
public OutClass(int length) { 
points = new Point[length]; 
 
for(int i = 0; i < points.length; i++) { 
points[i] = new Point(); 
points[i].setPoint(i*5, i*5); 
} 
} 
 
public void showPoints() { 
for(int i = 0; i < points.length; i++) { 
System.out.printf("Point[%d]: x = %d, y = %d%n",
i, points[i].getX(), points[i].getY());
} 
} 
}

他的意思就是類似上面的結果~Shock


reply to postreply to post
數學啊數學~總有一天我要狂嗑你!!
話題樹型展開
人氣 標題 作者 字數 發文時間
794 java.lang.String,int,int,int??? Wayne 1581 2012-12-28 16:52
652 Re:java.lang.String,int,int,int??? Wayne 12 2012-12-29 15:25
598 Re:java.lang.String,int,int,int??? chuanchu 59 2012-12-29 16:26
628 Re:java.lang.String,int,int,int??? Wayne 113 2012-12-29 17:15
700 Re:java.lang.String,int,int,int??? xgameboy 43 2012-12-29 15:28
628 Re:java.lang.String,int,int,int??? Wayne 105 2012-12-29 17:11
686 Re:java.lang.String,int,int,int??? lonely741215 695 2012-12-29 17:45
703 Re:java.lang.String,int,int,int??? xgameboy 1285 2012-12-29 20:42
531 Re:java.lang.String,int,int,int??? Wayne 59 2013-01-01 12:32
485 Re:java.lang.String,int,int,int??? ynchang 1137 2013-01-02 10:12
490 Re:java.lang.String,int,int,int??? Wayne 1194 2013-01-10 14:49
» JWorld@TW »  Java 新手區

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8