in Education by
Which of these method returns an instance of DateFormat that can format time information? (a) getTime() (b) getTimeInstance() (c) getTimeDateinstance() (d) getDateFormatinstance() The question was posed to me in unit test. This interesting question is from Text Formatting topic in division Regular Expressions of Java Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
The correct answer is (b) getTimeInstance() Easiest explanation: getTimeInstance() method returns an instance of DateFormat that can format time information.

Related questions

0 votes
    Which of this class can be used to format dates and times? (a) Date (b) SimpleDate (c) DateFormat (d ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of these class allows us to define our own formatting pattern for dates and time? (a) DefinedDateFormat ... Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of these formatting strings of SimpleDateFormat class is used to print AM or PM in time? (a) a (b ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of these package is used for text formatting in Java programming language? (a) java.text (b) java. ... Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which capturing group can represent the entire expression? (a) group * (b) group 0 (c) group * or ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of the following is not a class of java.util.regex? (a) Pattern class (b) matcher class (c) ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Object of which class is used to compile regular expression? (a) Pattern class (b) Matcher class (c) ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of the following matches nonword character using regular expression in java? (a) \w (b) \W (c) \ ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of the following matches end of the string using regular expression in java? (a) \z (b) \\ (c ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    What is the significance of Matcher class for regular expression in java? (a) interpretes pattern in the string ... Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    groupCount reports a total number of Capturing groups. (a) True (b) False I had been asked this question ... Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    What does public int end(int group) return? (a) offset from last character of the subsequent group (b) ... Regular Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    what does public String replaceAll(string replace) do? (a) Replace all characters that matches pattern with a ... Expressions of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of these operator is used to generate an instance of an exception than can be thrown by using throw? ... Handling of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
...