标题:按照 视频教程 写得 但是出错了 实在不知道哪儿出错了
取消只看楼主
wenxx10
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2008-8-4
 问题点数:0 回复次数:2 
按照 视频教程 写得 但是出错了 实在不知道哪儿出错了
class bl2
{
            public static void main(String [] args)
            {
                        int x=12;
                        {
                            if(x<3)
                                        System.out.println("x<3");
                                        System.out.println("ok");
                            else if(x>=3 && x<8)
                                        System.out.println("x>=3 && x<8");
                        }
              int y;            
                        /*if(x>0)
                                        y=x;
                        else
                                        y=-x;*/
                        y=x>0?x:-x;
                    
                        if(x==1);
                                    {
                                    if(y==1)
                                    {
                                                System.out.println("x==1,y==1");
                                    }
                                    else
                                    {
                                                System.out.println("x==1,y!=1");
                                  }
                                  }
                      else if(x>3)    
                                  {
                                  if(y==1)
                                    {
                                                System.out.println("x!=1,y==1");
                                    }
                                    else
                                    {
                                                System.out.println("x!=1,y!=1");
                                    }
                                    }
                        
                        x=1;
                        switch(x)
                        {
                                        case 1:
                                                        System.out.println("switch1");
                                        case 2:
                                                        System.out.println("seitch2");
                                        default:
                                                        System.out.println("other");
                        }              
            }
}

[[it] 本帖最后由 wenxx10 于 2008-8-18 13:45 编辑 [/it]]
搜索更多相关主题的帖子: 视频 教程 ultra args int 
2008-08-18 13:40
wenxx10
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2008-8-4
得分:0 
来人啊
2008-08-18 18:24
wenxx10
Rank: 1
等 级:新手上路
帖 子:33
专家分:0
注 册:2008-8-4
得分:0 
多谢了!
2008-08-18 19:31



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-228843-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.246363 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved