Skip to content

Interview Sansar

Software jobs interview preparation source

  • Home
  • Interview Questions
    • C Interview Questions
    • C++ Advanced Interview Questions
    • C++ Basic Interview Questions
    • Core Java Interview Questions
    • Java Collections Interview Questions
    • Java Multithreading Interview Questions
    • C# Basic Interview Questions
    • C# Advanced Interview Questions
    • C# Multi-threading Interview Questions
  • MCQs
    • MCQ-C++
    • MCQ-Java
    • MCQ-SQL
    • MCQs Algorithms and Data Structure
  • Programming Examples
    • C Programming Examples
    • C++ Programming Examples
    • C# Programming Examples
    • SQL Examples
    • Oracle PL SQL Examples
    • Time Complexity
  • Blog
    • C++ interview questions
    • C# interview questions
    • Java Interview Questions
    • Short Interview Questions
    • Behavioural / HR Interview
  • You-Tube
  • About
    • Why Visit
    • Sitemap
    • Contact Us
    • e-author

Tag: comparator

Java Collections Interview Questions

Write a program to sort employees by their experience. Employee class is not allowed to implement any interface.

August 18, 2024May 26, 2015 rsingh

Answer: For sorting employees we need to use either Comparable or comparator interface. Since, as per question, the Employee class is not allowed to implement

Read More
Java Collections Interview Questions

What are advantages of comparator in Java over comparable?

August 18, 2024January 29, 2023 rsingh

Answer includes advantages of comparator over comparable interfaces in java and the differences between them. As a side note, what’re advantages  of comparator over comparable, and when would

Read More

My Unique Books for YOU

All Rights Reserved 2023: Interview Sansar.
Proudly powered by WordPress | Theme: Fairy Blog by Candid Themes.