码迷,mamicode.com
首页 > 编程语言 > 详细

java 对象赋值

时间:2017-09-12 22:06:11      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:col   ace   cell   对象   return   int   ret   public   row   

功能:将cell放置在field[][]中

public Cell place(int row, int col, Cell o) {
//初始时ret 和field[][]都指向null
field[row][col]=o;
//field[][] 指向o对象
//此处ret仍为null
Cell ret=field[row][col];
return ret;
}

//实际并未将cell放置在field中,field[][]仍为空
// public Cell place(int row,int col ,Cell o)
// {
//初始时ret 和field[][]都指向null
// Cell ret=field[row][col];
// ret指向o
//field[][] 仍为空
// ret=o;
// return ret;
// }

java 对象赋值

标签:col   ace   cell   对象   return   int   ret   public   row   

原文地址:http://www.cnblogs.com/tianxiaoxiao/p/7512335.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!