adplus-dvertising

Welcome to the java util MCQs Page

Dive deep into the fascinating world of java util with our comprehensive set of Multiple-Choice Questions (MCQs). This page is dedicated to exploring the fundamental concepts and intricacies of java util, a crucial aspect of Java Programming. In this section, you will encounter a diverse range of MCQs that cover various aspects of java util, from the basic principles to advanced topics. Each question is thoughtfully crafted to challenge your knowledge and deepen your understanding of this critical subcategory within Java Programming.

frame-decoration

Check out the MCQs below to embark on an enriching journey through java util. Test your knowledge, expand your horizons, and solidify your grasp on this vital area of Java Programming.

Note: Each MCQ comes with multiple answer choices. Select the most appropriate option and test your understanding of java util. You can click on an option to test your knowledge before viewing the solution for a MCQ. Happy learning!

java util MCQs | Page 15 of 18

Explore more Topics under Java Programming

Q141.
Which of these packages contain all the collection classes?
Discuss
Answer: (b).java.util
Q142.
Which of these classes is not part of Javaโ€™s collection framework?
Discuss
Answer: (a).Maps
Q143.
Which of this interface is not a part of Javaโ€™s collection framework?
Discuss
Answer: (d).SortedList
Q144.
Which of these methods deletes all the elements from invoking collection?
Discuss
Answer: (a).clear()
Discuss
Answer: (a).A group of objects
Q146.
What is the output of this program?
    import java.util.*;
    class Array 
    {
        public static void main(String args[]) 
        {
            int array[] = new int [5];
            for (int i = 5; i > 0; i--)
                array[5-i] = i;
            Arrays.fill(array, 1, 4, 8);
            for (int i = 0; i < 5 ; i++)
                System.out.print(array[i]);
        }
    }
Discuss
Answer: (c).58881
Q147.
What is the output of this program?
    import java.util.*;
    class Bitset 
    {
        public static void main(String args[]) 
        {
            BitSet obj = new BitSet(5);
            for (int i = 0; i < 5; ++i)
                obj.set(i);
            obj.clear(2);
            System.out.print(obj);
        }
    }
Discuss
Answer: (a).{0, 1, 3, 4}
Q148.
Which of these is an incorrect form of using method max() to obtain a maximum element?
Discuss
Answer: (c).max(Comparator comp)
Q149.
Which of these methods sets every element of a List to a specified object?
Discuss
Answer: (b).fill()
Q150.
Which of these methods can randomize all elements in a list?
Discuss
Answer: (c).shuffle()

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!