首页 > 专家说

java取得week_of_year

来源:新能源网
时间:2024-08-17 10:42:01
热度:

java取得week_of_year【专家解说】:通过下即可得到:import java.util.Calendar;public class Tesat3 { public st

【专家解说】:通过下即可得到:
import java.util.Calendar;
public class Tesat3 {
public static void main(String[] args) {
Calendar c=Calendar.getInstance();
int i = c.get(Calendar.WEEK_OF_YEAR);
System.out.println(i);
}
}