Q 1. What are all the methods in Object class ?

Answer: This is the official documentation where we can get all the methods in Object class https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html .

Object class is superclass of all classes. toString(), equals(), finalize() (deprecated method) and hashcode() are the commonly heard methods from Object class.

Along with this clone(), notify(), notifyAll() and other overloaded versions of wait are available in this class.

Q 2. what is the difference between abstract class and an interface ?

Q 3. what is good to use abstract class or interface and why ?

Q 4. can we use final keyword with abstract class ?

Q 5. can we declare a class as an abstract when there are no abstract methods in it neither it is implementing any interface ?

Q 6. what is Inversion of Control in Spring boot (IoC) ?

Q 7. what is the next annotation called after @SpringBootApplication ?

Q 8. name some of the properties in application.properties file ?

Q 9. name all the keywords you remember in java.

Q 10. what are volatile and transient keywords ?

Q 11. are there any benefits of using Iterator over streams API for iterating an object ?

Q 12. how to block any user including yourself from deleting objects of an ArrrayList ?

Q 13. what are marker interfaces and what is the need for that? give any examples where you have created custom market interfaces.

Q 14. what are friend functions in java ?

Q 13. write pseudocode for Fibonacci series to print series till 10 numbers.

,,, to be continued for more questions and answers

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright © 2022 - 2024 itfreesource.com