Answer the question
In order to leave comments, you need to log in
This code in the IDE emphasizes the getInstance();?
package javaapplication;
import java.util.*;
import static java.lang.System.out;
/**
*
* @author Сергей
*/
public class FulMoons {
static int DAY_IM = 1000 * 60 * 60 * 24;
public static void main(String[] args){
Calendar c = new Calendar.getInstance();
c.set(2004, 1, 7, 15, 40);
long day1 = c.getTimeInMillis();
day1 += (DAY_IM * 29.52);
c.setTimeInMillis(day1);
for(int x = 0; x < 60; x++){
out.println(String.format("Полнолуние было в %tc", c));
}
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question