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: duplicate values in a set

Java Collections Interview Questions

If we try to insert duplicate values in a “Set”, what will happen? Do we get any complier error?

August 18, 2024July 14, 2014 rsingh

Just it doesn’t add duplicate values. Boolean add(E e) – Adds the specified element to this set if it is not already present (optional operation). As, add() method returns Boolean and on adding duplicates

Read More

My Unique Books for YOU

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