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

程序代码运行结果是(abdcbdcb)

时间:2017-07-07 15:28:35      阅读:108      评论:0      收藏:0      [点我收藏+]

标签:bool   运行   for   程序   boolean   ret   ++   class   结果   

public class Test {

   public static boolean show(char ch) {

        System.out.print(ch);

        return true;

   }

   public static void main(String[] args) {

        int x = 1;

        for (show(‘a‘); show(‘b‘) && x < 3; show(‘c‘)) {

              show(‘d‘);

              x++;

        }

   }

}

程序代码运行结果是(abdcbdcb)

标签:bool   运行   for   程序   boolean   ret   ++   class   结果   

原文地址:http://www.cnblogs.com/TusPark/p/7132035.html

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