当前位置:编程学习 > JAVA >>

java if判断

如果不进入studentAction则显示这一块 if (numPerPage == 0 && 这里怎么写?) SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String time_lt = dateFormat.format(new Date()); //当前时间 String time_gt = dateFormat.format(DateUtil2.getExcursionDate(time_lt, -6, "yyyy-MM-dd HH:mm:ss")); newMap.put("search_site_recv_time_gt", time_gt); newMap.put("search_site_recv_time_lt", time_lt); 如果进入studentAction则显示这一块 else if(怎么写?) SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String time_lt = dateFormat.format(new Date()); //当前时间 String time_gt = dateFormat.format(DateUtil2.getExcursionDate(time_lt, -6, "yyyy-MM-dd HH:mm:ss")) newMap.put("search_up_time_gt_or_down_time_gt", time_gt); .put("search_up_time_lt_or_down_time_lt", time_lt);
追问:当前是所有类都可以用,但studentAction不能用这个要用上面那个,主要是由于那个时间的名字不一样,所以不能用。sex是指什么,什么意思啊,我的应该写“什么点equals(” 呢?
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,