What is the use of isempty in java?



What is the use of isempty in java?..

Answer / Anish Kumar

In Java, `isEmpty()` is a method used to check if a Collection (such as an Array, List, Set etc.) is empty or not. It returns true if the collection is empty; otherwise false.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

HOW TO PRINT A NO IN WORDS USING WHILE LOOP THE NO WILL BE PRINTED WHEN IT WILL BE IN THE RANGE BETWEEN 1 AND 3?

1 Answers  


Differentiate between stringbuffer and stringbuilder in java.

1 Answers  


why java main method is given as static method?

2 Answers  


What is a stack class in java ?

1 Answers   Akamai Technologies,


List some features of the abstract class.

1 Answers  


What is t in parametric equations?

1 Answers  


what is the use of finalize()Method please explain with an example

3 Answers  


How many bits are in a sentence?

1 Answers  


what is the difference between the "protected and default" modifiers?

8 Answers  


what is the use of declaring constructor as private?

5 Answers   Cyient, IVY Technologies, Sai Softech, Virtusa,


what is the difference between statis block and static variable

7 Answers  


Is null a string or object in java?

1 Answers  


Categories