Java tutorial
//package com.java2s; import java.util.Calendar; import java.util.GregorianCalendar; public class Main { public static int getDaysOfYear() { return new GregorianCalendar().get(Calendar.DAY_OF_YEAR); } }