What is the difference between C++ and Java?

  C++ and Java are both popular programming languages, but they have some key differences that make them better suited for different types of projects. C++ is a low-level programming language that is often used for system programming, game development, and other performance-critical applications. It is a compiled language, which means that the code is translated…

Read More

Constructor Overloading in Java

Constructor are used to create the objects . new keyword always calls the  constructor of the class.  Constructor name is always be the same as the name of the class .Generally in 99% code ,the name of the method is  different from the name of the class . But the problem arises  that method  too can…

Read More

Fail Fast Vs Fail Safe Iterator In Java

Fail fast iterator while iterating through the collection , instantly throws Concurrent Modification Exception if there is structural modification  of the collection.  Fail Safe Iterator makes copy of the internal data structure (object array) and iterates over the copied data structure.Any structural modification done to the iterator affects the copied data structure. Fail Fast Iterator Fail Safe Iterator…

Read More