Calendar cal = Calendar.getInstance();
int date = cal.get(Calendar.DATE);
判断date的值就可以啦

解决方案 »

  1.   

    现在时间是:<%= date.toLocaleString() %><br>
      

  2.   

    一楼~~~然后判断Calendar.DAY_OF_WEEK就知道是星期几了
      

  3.   

    应该是:
    Calendar cal = Calendar.getInstance();
    int date = cal.get(Calendar.DAY_OF_WEEK);
    吧。date=1表示礼拜天,2表示礼拜一,...7表示礼拜六
      

  4.   

    Calendar cal = Calendar.getInstance();
    int date = cal.get(Calendar.DAY_OF_WEEK);
    System.out.println("NOw is :" + date);date是以周日开始的
      

  5.   

    java.util.Date noww=new java.util.Date ();
    int d=noww.getDay();
    d=0  星期天
    d=1  星期1
    ···
      

  6.   

    Calendar cal = new GregorianCalendar();
        
        // Get the components of the time
        int hour12 = cal.get(Calendar.HOUR);            // 0..11
        int hour24 = cal.get(Calendar.HOUR_OF_DAY);     // 0..23
        int min = cal.get(Calendar.MINUTE);             // 0..59
        int sec = cal.get(Calendar.SECOND);             // 0..59
        int ms = cal.get(Calendar.MILLISECOND);         // 0..999
        int ampm = cal.get(Calendar.AM_PM);             // 0=AM, 1=PM自己看看吧。
      

  7.   

    系统时间?

    new Date()
    之类的手段获得的应该是本地jvm的时间吧?通常,为了获得一致的系统时间
    使用数据库的sysdate
      

  8.   

    oracle中:
    select sysdate from dual;
      

  9.   

    为了知道是周几
    可以用
    select to_char(sysdate,'d') from dual;
    得到编码,周日为1,周一为2,...到周六为7select to_char(sysdate,'day') from dual;
    得到文字表示,
    在英文版下,是monday,...
    中文版下,是星期一,...
      

  10.   

    不是吧,连oracle也用上了!用Calendar就可以解决的
      

  11.   

    String temp[];
    ArrayList data = new ArrayList();
    while (rs.next())
    {
      data.add("a") 
    }
    String[] temp = new String[data.size()]; 
    for (int i=0; i < data.size(); i++)
    {
      temp[i] = "a";
    }
      

  12.   

    建议以后有不懂的类和方法可以先去查一下“JavaTM 2 SDK, Standard Edition Documentation”(搜索一下,很多地方有下载的)。