Location:
Search - java getTime
Search list
Description: 在原来的基础上进行修改
1.就是把接受线程放在了chat.java中了.这样在此jcreate3.x版本中就可以用了.
我是这样理解的.如果接受线程放在chatFrame中的话,在程序运行实例chatFrame对象后,得到的只是一个没接收数据前的List,所以不管发多少数据都不会显示的窗体上.不知是不是?
2.用Calendar对象返回时间,虽是做出来了但Calendar对象的getTime()方法返回的时间toString().getBytes()后,时间保存在数组的位置10上,应该是第11个字节上.-the original basis for a change. Thread is on the making of the chat.java a statement. This in this kind jcreate3.x versions can be used. I understand it this way. If we accept the threads on the ch atFrame the case, in the process of running examples chatFrame target, the only one not receiving data before the List, So regardless of the number of data not shown on the forms. maybe it is two. with the return of objects Calendar , Although it is done but the Calendar Object getTime () method returns, the time toStri ng (). getBytes (), the time to preserve the location in the array 10, should be the first on 11 byte.
Platform: |
Size: 10572 |
Author: 炸鱼 |
Hits:
Description: 用JAVA小程序,获得系统当前时间,也许对你有帮助
Platform: |
Size: 2925 |
Author: 日记 |
Hits:
Description: 在原来的基础上进行修改
1.就是把接受线程放在了chat.java中了.这样在此jcreate3.x版本中就可以用了.
我是这样理解的.如果接受线程放在chatFrame中的话,在程序运行实例chatFrame对象后,得到的只是一个没接收数据前的List,所以不管发多少数据都不会显示的窗体上.不知是不是?
2.用Calendar对象返回时间,虽是做出来了但Calendar对象的getTime()方法返回的时间toString().getBytes()后,时间保存在数组的位置10上,应该是第11个字节上.-the original basis for a change. Thread is on the making of the chat.java a statement. This in this kind jcreate3.x versions can be used. I understand it this way. If we accept the threads on the ch atFrame the case, in the process of running examples chatFrame target, the only one not receiving data before the List, So regardless of the number of data not shown on the forms. maybe it is two. with the return of objects Calendar , Although it is done but the Calendar Object getTime () method returns, the time toStri ng (). getBytes (), the time to preserve the location in the array 10, should be the first on 11 byte.
Platform: |
Size: 10240 |
Author: 炸鱼 |
Hits:
Description: 用JAVA小程序,获得系统当前时间,也许对你有帮助-Using JAVA applets, access to the system current time, maybe you have to help
Platform: |
Size: 3072 |
Author: 日记 |
Hits:
Description: pstmt = conn.prepareStatement("select ordernumber,datetime,price,dayofmoney from zujie where ordernumber= "+ cdName + " ")
rs=pstmt.executeQuery()
if(rs!=null && rs.next()){
String datetime = rs.getString(2)
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat ("yyyy-MM-dd")
Date date = new Date()
String date1=formatter.format(date)
ParsePosition pos = new ParsePosition(0)
ParsePosition pos1 = new ParsePosition(0)
Date dt1=formatter.parse(datetime,pos)
Date dt2=formatter.parse(date1,pos1)
Long l = (dt2.getTime()-dt1.getTime())/(3600*24*1000)+1
double price = rs.getDouble(3)
double dayofmoney=rs.getDouble(4)
double dayofmoneybuy=dayofmoney*l
double otherMoney = price-dayofmoneybuy
request.setAttribute("price", price)
request.setAttribute("l", l)
request.setAttribute("dayofmoney", dayofmoneybuy)
request.setAttribute("otherMoney", otherMoney)-pstmt = conn.prepareStatement("select ordernumber,datetime,price,dayofmoney from zujie where ordernumber= "+ cdName+ " ")
rs=pstmt.executeQuery()
if(rs!=null && rs.next()){
String datetime = rs.getString(2)
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat ("yyyy-MM-dd")
Date date = new Date()
String date1=formatter.format(date)
ParsePosition pos = new ParsePosition(0)
ParsePosition pos1 = new ParsePosition(0)
Date dt1=formatter.parse(datetime,pos)
Date dt2=formatter.parse(date1,pos1)
Long l = (dt2.getTime()-dt1.getTime())/(3600*24*1000)+1
double price = rs.getDouble(3)
double dayofmoney=rs.getDouble(4)
double dayofmoneybuy=dayofmoney*l
double otherMoney = price-dayofmoneybuy
request.setAttribute("price", price)
request.setAttribute("l", l)
request.setAttribute("dayofmoney", dayofmoneybuy)
request.setAttribute("otherMoney", otherMoney)
Platform: |
Size: 136192 |
Author: 每 |
Hits:
Description: 使用JAVA编译的物业管理系统,部分代码:
package com.wy.util
import java.util.*
public class nowdate {
public static int getSystime() {
Calendar tt = Calendar.getInstance() //获取Calendar对象
Date time = tt.getTime() //获取日期
int year = time.getYear() + 1900 //获取年份
int month = time.getMonth() + 1 //获取月份
return year * 100 + month //组成数字
}
public static void main(String args[]) {
Calendar tt = Calendar.getInstance()
Date time = tt.getTime()
int year = time.getYear() + 1900
int month = time.getMonth() + 1
}
}-JAVA compiled using property management system, part of the code:
package com.wy.util
import java.util.*
public class nowdate {
public static int getSystime() {
Calendar tt = Calendar.getInstance() //获取Calendar对象
Date time = tt.getTime() //获取日期
int year = time.getYear()+ 1900 //获取年份
int month = time.getMonth()+ 1 //获取月份
return year* 100+ month //组成数字
}
public static void main(String args[]) {
Calendar tt = Calendar.getInstance()
Date time = tt.getTime()
int year = time.getYear()+ 1900
int month = time.getMonth()+ 1
}
}
Platform: |
Size: 839680 |
Author: john |
Hits: