Moumita has Published 173 Articles

What is the scope of protected access modifier in Java?

Moumita

Moumita

Updated on 30-Jul-2019 22:30:20

When a variable, method or constructor that are declared protected in a superclass can be accessed only by the subclasses in other package or any class within the package of the protected members' class. The protected access modifier cannot be applied to class and interfaces. Methods, fields can be declared ... Read More

How to use the final modifier in Java?

Moumita

Moumita

Updated on 30-Jul-2019 22:30:20

The final modifier can be associated with methods, classes and variables. Once declared final − A final class cannot be instantiated. A final method cannot be overridden. A final variable cannot be reassigned. Example Live Demo class TestExample { final int value = ... Read More

Identify all duplicates irrespective of the order of the input

Moumita

Moumita

Updated on 30-Jul-2019 22:30:20

Indeed your problem is weird as the order is not fixed otherwise it was a straightforward requirement.In order to get your task done, you need to search in all names individually and to be sure that you don’t get the entries which are super set of your search, you need ... Read More

Advertisements