DateFormat class Flashcards

1
Q

Formats the given date for the default locale and returns a string representation. Its overloaded version takes a StringBuffer and position as arguments and returns a StringBuffer object.

A

String format(Date date)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Reads the given String according to the default locale conventions to return a Date object; throws ParseException if it fails. Has an overloaded version that takes a ParsePosition( the position from which to parse the string) as an additional argument.

A

Date parse(String source)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Formats the given date for the default locale and returns a textual representation.

A

String format(Date date)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Returns the default DateFormat instance that supports both date and time; it uses the DateFormat.Short style for both date and time.

A

DateFormat.getInstance()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Returns the DateFormat instance suitable for processing dates for default locale; has two overloaded versions that take style and Locale as additional arguments.

A

DateFormat.getDateInstance()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Returns the DateFormat instance suitable for processing time for default locale; its two overloaded versions take style and Locale as additional arguments.

A

DateFormat.getTimeInstance()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Returns the DateFormat instance suitable for processing both date and time for a default locale; its two overloaded versions take style and Locale as additional arguments.

A

DateFormat.getDateTimeInstance()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly