码迷,mamicode.com
首页 > 其他好文 > 详细

有关return i++的小问题

时间:2016-10-11 21:05:14      阅读:98      评论:0      收藏:0      [点我收藏+]

标签:

package com.lirl.sprc;

public class TestReturn {


int a =100;
public static void main(String[] args){

TestReturn return1 = new TestReturn();
int b = return1.pius();
System.out.println("a:" + return1.a +",b:"+b);

}


public int pius(){

return a++;

}
}

***********输出************************

a:101,b:100

有关return i++的小问题

标签:

原文地址:http://www.cnblogs.com/lirl/p/5950648.html

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