Menu
Question Index
...

What will be the output of the following program?

import java.util.*;
public class Remove {
    public static void main(String[] args) {
        ArrayDeque<String> e = new ArrayDeque<String>();
        e.add("Maths");
        e.add("Science");
        e.add("Social");
        String rt = e.pop();
        System.out.print(e);
    }
}


[Social, Science, Maths]
[Maths, Science, Social]
[Science, Social]
[Maths, Science]
Compilation Error or Runtime Error

Doubts

Problems

Topic: Java ArrayDeque Class

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App