PDA

View Full Version : [SOLVED] When to java initialize variables?



SpinningAround
January 10th, 2010, 07:49 PM
I wonder when Java will initialize varibles is it when the program is compiled or when it start?

How would this end up? Todays date or the date when the program is started (new for every time).



private static int beforeDate=date.get(Calendar.DAY_OF_YEAR);

The Secret
January 10th, 2010, 08:57 PM
In runtime.