Imocha Test Questions And Answers Pdf Patched May 2026
Answer: Explanation: A marker interface is an interface with no methods or fields. It simply tells the compiler to treat the objects of the class implementing it differently. Serializable and Cloneable are classic examples of marker interfaces in Java.
**Q2. Fill in the
Answer: Explanation: == compares reference (memory address). s1 is in the String pool, s2 is a new object in the heap. References are different, so false . .equals() compares content. Content is "Hello" for both, so true . Sample SQL Questions Q3. Which SQL keyword is used to retrieve only distinct (different) values? A) DIFFERENT B) UNIQUE C) DISTINCT D) SEPARATE imocha test questions and answers pdf
public class Test { public static void main(String[] args) { String s1 = "Hello"; String s2 = new String("Hello"); System.out.println(s1 == s2); System.out.println(s1.equals(s2)); } } A) true, false B) false, true C) true, true D) false, false Answer: Explanation: A marker interface is an interface
Answer: Explanation: Speed of the train relative to man = (125/10) m/sec = 12.5 m/sec. Convert m/sec to km/hr: 12.5 * (18/5) = 45 km/hr. Let the speed of the train be $x$ km/hr. Then, relative speed = $(x - 5)$ km/hr. Therefore, $x - 5 = 45$ implies $x = 50$ km/hr. References are different, so false
Answer: Explanation: The SELECT DISTINCT statement is used to return only distinct (different) values.