70 Java MCQS Questions

1.The default value of a static integer variable of a class in Java is, (a) 0 (b) 1 (c) Garbage value (d) Null (e) -1. Answer:A 2.What will be printed as the output of the following program? public class testincr { public static void main(String args[]) { int i = 0; i = i++ + … Read more

Java MCQS Part 2

This set of Java Multiple Choice Questions & Answers focuses on “Data Structures-Queue”. 1. Which of the below is not a subinterface of Queue? a) BlockingQueue b) BlockingEnque c) TransferQueue d) BlockingQueue Answer: b Explanation: BlockingQueue, TransferQueue and BlockingQueue are subinterfaces of Queue. 2. What is the remaining capacity of BlockingQueue whose intrinsic capacity is … Read more