in Education by
What is the difference between Queue and Stack? (a) Stack is LIFO; Queue is FIFO (b) Queue is LIFO; Stack is FIFO (c) Stack and Queue is FIFO (d) Stack and Queue is LIFO This question was posed to me at a job interview. This interesting question is from Data Structures-Queue topic in chapter java.util – The Collections Framework of Java Select the correct answer from above options Java questions and answers, Java questions pdf, Java question bank, Java questions and answers pdf, mcq on Java pdf, Java questions and solutions, Java mcq Test , Interview Java questions, Java Questions for Interview, Java MCQ (Multiple Choice Questions),Core Java Questions, Core Java MCQ,core java interview questions for experiencedcore java interview questions for 3 years experience,java programming questions,core java interview questions for freshers,java interview questions and answers for freshers, java programming questions and answers pdf, java interview questions for beginners

1 Answer

0 votes
by
 
Best answer
Right answer is (a) Stack is LIFO; Queue is FIFO To explain: Stack is Last in First out (LIFO) and Queue is First in First out(FIFO).

Related questions

0 votes
    What is the correct method used to insert and delete items from the queue? (a) push and pop (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the below is not a subinterface of Queue? (a) BlockingQueue (b) BlockingEnque (c) TransferQueue ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Where does a new element be inserted in linked list implementation of a queue? (a) Head of list (b ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is the difference between length() and size() of ArrayList? (a) length() and size() return ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is the difference between TreeSet and SortedSet? (a) TreeSet is more efficient than SortedSet (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    What is difference between dequeue() and peek() function of java? (a) dequeue() and peek() remove ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    How to get difference between two dates? (a) long diffInMilli = java.time.Duration.between(dateTime1, ... questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which of these object stores association between keys and values? (a) Hash table (b) Map (c) Array ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these is a bundle of information passed between machines? (a) Mime (b) Cache (c) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    An expression involving byte, int, and literal numbers is promoted to which of these? (a) int (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 28, 2021 in Education by JackTerrance
0 votes
    Which of these is returned by greater than , less than and equal to operators? (a) Integers ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which concept of Java is achieved by combining methods and attribute into a class? (a) Encapsulation (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is it called if an object has its own lifecycle and there is no owner? (a) Aggregation (b) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is it called where object has its own lifecycle and child object cannot belong to another parent object? ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which component is used to compile, debug and execute java program? (a) JVM (b) JDK (c) JIT ( ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
...