swap in java?

Is it possible to write a swap method in java? these two variables will be primitives.

It's not possible, without any objects or arrays. (Java passes stuff by value.)

 

check here

posted @ 2014-09-20 08:48  zmiao  阅读(137)  评论(0编辑  收藏  举报