| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1309 人关注过本帖
标题:怎么才能学好java啊
只看楼主 加入收藏
dukai5302885
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2008-7-24
收藏
 问题点数:0 回复次数:4 
怎么才能学好java啊
我学习java马上就一个月了 每天都在看别人写的代码然后自己再背着写出来 但是我感觉进步的效果不大! 是不是我的学习方法有问题呢 ?

哪位老师能告诉我怎么样学习才能使更好的更快的提高自己!!!

谢谢各位老师了 !!!
搜索更多相关主题的帖子: java 效果 老师 学习 代码 
2008-07-26 14:10
YCVSCY
Rank: 1
等 级:新手上路
帖 子:45
专家分:0
注 册:2008-7-11
收藏
得分:0 
其实java要比c++容易多了.
刚开始背点代码很正常,不过学了一个月了就要开始尝试自己写点什么了,
你背别人的代码时要知道每句的含义是什么.

如果你c语言学的还可以的话,那你就只要花不多的事件去看看 类,对象,多态,继承,异常,等概念.  

java的类机制要比c++的清晰多了,而且没有指针,所以比较好学.
2008-07-26 21:42
ming_ne
Rank: 1
来 自:山东东营
等 级:新手上路
帖 子:3
专家分:0
注 册:2008-7-6
收藏
得分:0 
java
所谓的高手都是用无尽的寂寞换来的。努力就好

不想懂得,很不舍得
2008-07-27 06:45
我的青春我做主
Rank: 1
等 级:新手上路
帖 子:10
专家分:0
注 册:2008-7-29
收藏
得分:0 
JAVA
我跟你一样,刚学java一个月,感觉还不错.
加油!!!
下面是我自己刚学完循环之后写的一个简单的程序,看下啊,给点建议哦...


import java.util.*;

public class XiaoHong
{
    public static void main(String[] args)
    {
        System.out.println("*****************欢迎使用小红的万年历****************");
        Scanner input = new Scanner(System.in);     // 扫描器,从键盘接收输入
        int year;
        int month;
        String answer = "y";
        while (answer.equals("y"))
        {
            boolean isRn = false;
            System.out.println("请输入年份:");
            year = input.nextInt();
            System.out.println("请输入月份:");
            month = input.nextInt();
            if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
            {
                System.out.println(year + "\t闰年");
                isRn = true;
            }
            else
            {
                System.out.println(year + "\t平年");
                isRn = false;
            }
            while (month > 12 || month <= 0)
            {
                System.out.println("对不起,输入月份不正确!\n\n请重新输入:");
                month = input.nextInt();

            }
            int yue = 0;
            switch (month)
            {
                case 1:
                case 3:
                case 5:
                case 7:
                case 8:
                case 10:
                case 12:
                    System.out.println(month + "月\t共31天");
                    yue = 31;
                    break;
                case 4:
                case 6:
                case 9:
                case 11:
                    System.out.println(month + "月\t共30天");
                    yue = 30;
                    break;
                case 2:
                    if (isRn && month == 2)
                    {
                        System.out.println(month + "月\t共29天");
                        yue = 29;
                    }
                    else
                    {
                        System.out.println(month + "月\t共28天");
                        yue = 28;
                    }
                    break;


            }
            int sum = 0;
            for (int i = 1900; i < year; i++)
            {
                if ((i % 4 == 0 && i % 100 != 0) || i % 400 == 0)
                {
                    sum = sum + 366;

                }
                else
                {
                    sum = sum + 365;
                }
            }
            for (int i = 1; i < month; i++)
            {
                if (i == 1 || i == 3 || i == 5 || i == 7 || i == 8 || i == 10
                        || i == 12)
                {
                    sum = sum + 31;
                }
                else if (i == 4 || i == 6 || i == 9 || i == 11)
                {
                    sum = sum + 30;
                }
                else if (i == 2 && isRn)
                {
                    sum = sum + 29;
                }
                else
                {
                    sum = sum + 28;
                }
            }
            System.out.println(year + "年" + month + "月距离1900年1月1日有" + sum + "天");
            int firstdayofmonth;
            int num = 1 + sum % 7;
            if (num == 7)
            {
                firstdayofmonth = 0;
            }
            else
            {
                firstdayofmonth = num;
            }
            System.out.println("\n该月的第一天是星期" + firstdayofmonth);
            System.out.println("\n星期日\t星期一\t星期二\t星期三\t星期四\t星期五\t星期六");
            int x = sum % 7 + 1;
            if (x != 7)
            {
                for (int i = 0; i < x; i++)
                {
                    System.out.print("\t");
                }
            }
            for (int i = 1; i <= yue; i++)
            {
                int everydayweek = (x + i - 1) % 7;
                if (everydayweek == 6)
                {
                    System.out.print(i + "\n");
                }
                else
                {
                    System.out.print(i + "\t");
                }
            }
            System.out.println("\n\n是否继续y/n");
            answer = input.next();
        }
        System.out.println("\n程序结束!");

    }

}
2008-07-30 15:31
一水寒烟
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2008-7-14
收藏
得分:0 
trttt
2008-07-30 16:44
快速回复:怎么才能学好java啊
数据加载中...
 
   



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

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