Question
Note : The program is executed at 3 hour 55 minutes and 4 sec on Monday, 15 July(24 hours time).
import java.text.*;
import java.util.*;
class Date_formatting
{
public static void main(String args[])
{
Date date = new Date();
SimpleDateFormat sdf;
sdf = new SimpleDateFormat("z");
System.out.print(sdf.format(date));
}
}
a.
z
b.
Jul
c.
Mon
d.
PDT
Posted under Java Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What is the output of this program? Note : The program is executed at 3 hour 55 minutes and 4 sec on Monday, 15 July(24 hours time).
Similar Questions
Discover Related MCQs
Q. Which of the following is not a class of java.util.regex?
View solution
Q. What is the significance of Matcher class for regular expression in java?
View solution
Q. Object of which class is used to compile regular expression?
View solution
Q. Which capturing group can represent the entire expression?
View solution
Q. groupCount reports a total number of Capturing groups.
View solution
Q. Which of the following matches nonword character using regular expression in java?
View solution
Q. Which of the following matches end of the string using regular expression in java?
View solution
Q. What does public int end(int group) return?
View solution
Q. What does public String replaceAll(string replace) do?
View solution
Q. What does public int start() return?
View solution
Q. Which of the following is not introduced with Java 8?
View solution
Q. What is the purpose of BooleanSupplier function interface?
View solution
Q. What is the return type of lambda expression?
View solution
Q. Which is the new method introduced in java 8 to iterate over a collection?
View solution
Q. What are the two types of Streams offered by java 8?
View solution
Q. Which method is used to create a directory with fileattributes?
View solution
Q. Which method can be used to check fileAccessiblity?
View solution
Q. How can we delete all files in a directory?
View solution
Q. How to copy the file from one location to other?
View solution
Q. How can we get the size of specified file?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Java Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!