www.HadoopExam.com

HadoopExam Learning Resources

HadoopExam Training, Interview Questions, Certifications, Projects, POC and Hands On exercise access

    40000+ Learners upgraded/switched career    Testimonials

Question 1: Which of the following is a correct override for extending the ListResourceBundle class?

Question 1: Which of the following is a correct override for extending the ListResourceBundle class? 

1.        public HashMap<String, String> getContents() {

Map<String, String> contents = new HashMap<>();

contents.add("Hadoop", "Exam");

return contents;

}

2.        public Object[] getContents() {

return new Object[] { { "Hadoop" } , { "Exam" } };

}

3.        public Object[][] getContents() {

return new Object[][] { { "Hadoop", "Exam" } };

}

4.        public String[] getKeysAndValues() {

return new String[] { { "Hadoop" } , { "Exam" } };

} 

Correct Answer : 3 Exp : The return type of the getContents() method is Object[][]. Further, the method should return a new

object of type Object [][] from the method body.

I have cleared my Java 1Z0-808 Certification exam with 92% using this simulator

I have cleared my Java 1Z0-809 Certification exam with 96% using this simulator

Visit Home Page : http://hadoopexam.com for more detail . As you are not blacklisted user.

You are here: Home Oracle Java 1Z0-809 Question 1: Which of the following is a correct override for extending the ListResourceBundle class?