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 11 of 18

Explore more Topics under Java Programming

Q101.
If the size of the array used to implement a circular queue is MAX_SIZE. How rear moves to traverse inorder to insert an element in the queue?
Discuss
Answer: (b).rear=(rear+1)%MAX_SIZE
Q102.
Which of these standard collection classes implements all the standard functions on list data structure?
Discuss
Answer: (a).Array
Q103.
Which of this method is used to make all elements of an equal to specified value?
Discuss
Answer: (b).fill()
Q104.
Which of these method of Array class is used sort an array or its subset?
Discuss
Answer: (c).sort()
Q105.
Which of these methods can be used to search an element in a list?
Discuss
Answer: (d).binaryserach()
Q106.
What is the output of this program?
    import java.util.*;
    class Arraylist 
    {
        public static void main(String args[])
        {
            ArrayList obj1 = new ArrayList();
            ArrayList obj2 = new ArrayList();
            obj1.add("A");
            obj1.add("B");
            obj2.add("A");
            obj2.add(1, "B");
            System.out.println(obj1.equals(obj2));
        }
    }
Discuss
Answer: (c).true
Q107.
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.sort(array);
            for (int i = 0; i < 5; ++i)
             System.out.print(array[i]);;
        }
    }
Discuss
Answer: (a).12345
Q108.
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.sort(array);
            System.out.print(Arrays.binarySearch(array, 4));
        }
    }

a.

2

b.

3

c.

4

d.

5

Discuss
Answer: (b).3
Q109.
Which of these interface declares core method that all collections will have?
Discuss
Answer: (d).Collection
Q110.
Which of these interface handle sequences?
Discuss
Answer: (b).List

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!