Interview Questions and Answers - Order By Newest Q1641. Write a function that returns the depth of a tree. Algorithm
This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1642. Write code to find the node where two linked lists intersect. Algorithm
This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1643. Check if tic tac toe has a winner Algorithm
This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1644. Write program to balance a binary tree Algorithm
This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q1645. Given a graph, find if it represents a tree Algorithm
Ans. We can simply find it by checking the criteria of a tree. A tree will not contain a cycle, so if there is any cycle in the graph, it is not a tree. We can check it using another approach, if the graph is connected and it has V-1 edges, it could be a tree. Here V is the number of vertices in the graph Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1646. Explain different sorting algorithms and Big O of each Algorithm
This question was recently asked at 'Microsoft,ServiceNow'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 2 Companies Q1647. Write a program to find loop in a linked list Algorithm
This question was recently asked at 'Microsoft'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1648. How to convert a bst to doubly linked list Algorithm
This question was recently asked at 'Amazon'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1649. What is a package management system ? Tool
Ans. A package management system is a collection of software that automates the process of installing, upgrading and configuring an application. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  rpm Q1650. What is RPM ? Tool
Ans. Redhat Packaging system or rpm is a Package Manager or type of Package Management system extensively used for Linux systems. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  rpm  package management Q1651. What is priority inversion inheritance method?
Ans. https://en.wikipedia.org/wiki/Priority_inversion Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Ans. Priority inversion is a problematic scenario in scheduling in which a high priority task is indirectly preempted by a lower priority task effectively inverting the relative priorities of the two tasks. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 5 Companies Q1653. Does Hibernate synchronize entity with the database automatically i.e any change to entity gets updated in DB ? Hibernate
Ans. Yes, the feature is there but can be override with changing the Flush Mode. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Q1654. How can we make sure that Hibernate doesn't update the entity changes to DB or how to keep the entity detached ? Hibernate
Ans. If it's only a read only transaction, we can wrap the get / load call in read only transaction.
If we want it to be application wide, we an set the flush mode accordingly or else we can evict the entity object to remove them from session. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Try 2 Question(s) Test Q1655. What is the difference between session.clear and session.evict ? Hibernate
Ans. session.clear clears all the objects from session whereas session.evict is used for evicting a particular entity. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate session clear  hibernate evict Try 2 Question(s) Test Q1656. What is the use of Hibernate session.clear() ? Hibernate
Ans. It is used to clear the session and is used to dissociate disconnect all the objects from the session. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate session clear Q1657. What is the use of Hibernate session.evict()? Hibernate
Ans. It is used to dissociate / disconnect a particular object from the session. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  hibernate session evict  hibernate evict Q1658. What are the benefits of using Prepared statements ? Database
Ans. 1. Precompilation , DB-side caching and reuse of same execution plan leads to overall faster execution.
2. Automatic prevention of SQL injection attacks by escaping special characters Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Prepared statements  benefits of prepared statements Asked in 1 Companies Try 1 Question(s) Test Q1659. If a company comes to you with a problem statement, how would you help provide a solution for it ? General
This question was recently asked at 'UST Global'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1660. What are the benefits of using prepared statements ? Does that benefit extend only if similar prepared statements are used within a application or it extends even with multiple applications having similar prepared statement ? Database
Ans. Prepared Statements helps in reuse of database execution plan which can be cached at Database level and hence helps achieving faster execution and performance. As cached ps objects are creating at Database level and not application level, the use and benefit extends across multiple applications. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Prepared statements  benefits of prepared statements Asked in 1 Companies Try 1 Question(s) Test Q1661. Where the prepared Statement object creating - In Java application or DB ? Database
Ans. Prepared Statement objects are created and cached at database level. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Prepared statements Asked in 1 Companies Try 1 Question(s) Test Q1662. What are the types of Executor Interfaces ? Core Java
Ans. Executor - Simple Interface that supports launching new tasks.
ExecutorService - Subinterface of Executor, which adds features that help manage the lifecycle, both of the individual tasks and of the Executor itself.
ScheduledExecutorService - Subinterface of ExecutorService, supports future and-or periodic execution of tasks. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Executor Interfaces Asked in 1 Companies Q1663. What are the core interfaces in Hibernate? Hibernate
Ans. Session,SessionFactory,Configuration,Transaction,query and Criteria Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  core interfaces of Hibernate Asked in 1 Companies   frequent Try 1 Question(s) Test Q1664. If two Interfaces have same Method, how to handle that Method in a Class implementing these two Interfaces? Core Java
Ans. It doesn't matter how you define that method in implementing class. there will be only one definition provided and that method can be accessed using reference of either of the interfaces. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q1665. Which type of EJB can use bean pooling? Java EE
Ans. Stateless Session Beans Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  EJB  java beans Asked in 1 Companies Q1666. Difference between Include Directive and include action in jsp Java EE
Ans. Include directive includes the file at translation time (the phase of JSP life cycle where the JSP gets converted into the equivalent servlet) whereas the include action includes the file at runtime. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  JSP  include directive  include action Asked in 1 Companies Q1667. Difference between import and include directive in jsp Java EE
This question was recently asked at 'ADP'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  JSP  import and include directive in jsp Asked in 1 Companies Q1668. What are the core interfaces of Spring mvc ? Spring
This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  core interfaces of Spring mvc Q1669. Difference between MultipartResolver setMaxUploadSize and setMaxUploadSizePerFile ? Spring
Ans. setMaxUploadSize is used to set the maximum size of uploads that can be made in a request whereas setMaxUploadSizePerFile sets the maximum size per uploaded file.
Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  MultipartResolver Q1670. How to set maximum file upload size in Spring MVC ? Spring
Ans. We can use class MultipartResolver method setMaxUploadSize. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve