ExamVeda
Login
Home
31
What will be the output of the following Java program?
import java.text.*;
import java.util.*;
class Date_formatting
{	 
    public static void main(String args[])
    {
  Date date = new Date();
  SimpleDateFormat sdf;
        sdf = new SimpleDateFormat("hh:mm:ss");
        System.out.print(sdf.format(date));
    }	
}

Note : The program is executed at 3 hour 55 minutes and 4 sec (24 hours time).
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
32
What does public int end(int group) return?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
33
What is the significance of Matcher class for regular expression in java?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
34
Which capturing group can represent the entire expression?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
35
Which of the following matches end of the string using regular expression in java?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
36
Which of these formatting strings of SimpleDateFormat class is used to print AM or PM in time?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
37
Which of the following is not a class of java.util.regex?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
38
What will be the output of the following Java program?
import java.text.*;
import java.util.*;
class Date_formatting
{	 
    public static void main(String args[])
    {
  Date date = new Date();
  SimpleDateFormat sdf;
        sdf = new SimpleDateFormat("E MMM dd yyyy");
        System.out.print(sdf.format(date));
    }	
}

Note: The program is executed at 3 hour 55 minutes and 4 sec on Monday, 15 July(24 hours time).
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
39
What does public int start() return?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
40
groupCount reports a total number of Capturing groups.
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board