Java 编程,打印昨天的当前时刻

答:

public class YesterdayCurrent{ 
 public static void main(String[] args){ 
 Calendar cal = Calendar.getInstance(); 
 cal.add(Calendar.DATE, -1); 
 System.out.println(cal.getTime()); 
 } 
 }