Assume Calendar calendar = new GregorianCalendar(). __________ returns the month of the year.

a. calendar.get(Calendar.MONTH)
b. calendar.get(Calendar.MONTH_OF_YEAR)
c. calendar.get(Calendar.WEEK_OF_MONTH)
d. calendar.get(Calendar.WEEK_OF_YEAR)


a B is wrong since Calendar.MONTH_OF_YEAR is not a valid field.

Computer Science & Information Technology

You might also like to view...

Even with the database vendor identified, locating the version number can be a difficult task.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

The ____ of a variable indicates where the declared memory location can be used in an application's code.

A. dimension B. type C. scope D. extent

Computer Science & Information Technology

New cars come with an onboard computer that controls anti-lock brakes, air bag deployment, fuel injection, etc.  The software is known as ____.

A. a multi-user system B. an embedded system C. an enterprise system D. mobile application software

Computer Science & Information Technology

How is laser printer resolution measured?

A. Color per inch B. Dots per inch C. Pixels per inch D. Bits per inch

Computer Science & Information Technology