#Essential Core Java Interview Questions- For Freshers and Experienced
Explore tagged Tumblr posts
herovired12 · 11 months ago
Text
Essential Core Java Interview Questions: For Freshers and Experienced, offered by Hero Vired, provides a comprehensive learning experience for individuals at all career levels. Covering fundamental and advanced Java concepts, this course equips candidates with the knowledge and skills to excel in Java-related interviews. For More Information, Please Visit The Blog.
0 notes
divya4567 · 20 days ago
Text
What to Expect from a Good Software Testing Course Curriculum
In today’s tech-driven world, software testing has moved far beyond simply finding bugs. It's now a strategic, high-demand skill that plays a vital role in delivering quality software products. Whether you're a fresher looking to enter the IT industry or a working professional planning a career shift, choosing the right software testing course is a critical first step.
But how do you know if the curriculum is truly worth your time and money?
Here’s a breakdown of what you should expect from a good software testing course curriculum — so you can make a confident, informed decision.
1. Strong Foundations in Manual Testing
Every good tester starts with the basics. A solid course begins with manual testing fundamentals — covering Software Development Life Cycle (SDLC), Software Testing Life Cycle (STLC), test case design, bug life cycle, and requirement analysis. These are not just theoretical concepts but the backbone of practical testing skills.
2. Hands-On Practice with Real-World Projects
Testing cannot be learned by theory alone. A good course provides live projects and case studies where students can apply their knowledge in realistic scenarios. From writing test cases to executing them and reporting bugs, real-world exposure builds confidence and prepares learners for the job market.
If you're considering a Software Testing Course in Pune, look for training providers that emphasize practical learning and offer access to industry projects.
3. Exposure to Automation Testing Tools
Automation is now a key part of almost every QA process. The course should introduce you to tools like Selenium, TestNG, and Maven, along with scripting basics in Java or Python. Even at an introductory level, knowing how automation works gives you a competitive edge.
You should also learn when to use automation — and more importantly, when not to.
4. Introduction to API and Performance Testing
A well-rounded curriculum includes exposure to advanced areas like API Testing (using tools like Postman or Rest Assured) and Performance Testing (with JMeter or similar tools). These skills are often requested by recruiters and can significantly expand your job opportunities.
5. Industry Tools and Platforms
Look for training that includes hands-on use of popular tools such as:
JIRA – for bug tracking and project management
Git/GitHub – for version control
CI/CD basics – to understand integration with DevOps environments
This practical knowledge makes you job-ready from day one.
6. Soft Skills & Interview Readiness
Technical skills are essential, but soft skills and interview preparation matter too. A good course will help you build a strong resume, prepare for common QA interview questions, and even conduct mock interviews to build your confidence.
7. Certification & Placement Support
A recognized certification (e.g., ISTQB Foundation Level) adds credibility to your profile. Choose a course that either prepares you for certification exams or offers its own industry-acknowledged certificate. Bonus if they help with placements or internship opportunities, especially if you’re based in Pune.
That’s why enrolling in a Software Testing Course in Pune from a reputed training center with placement support can give you a strong start in the QA industry.
Final Thoughts
A great software testing course is more than just recorded lectures or theoretical notes. It’s a well-balanced mix of core concepts, hands-on tools, real-time projects, and industry exposure — everything you need to grow from a beginner to a confident QA professional.
So before you sign up, ask yourself: Does the curriculum match these standards?
About Skillio
Skillio is a forward-thinking skill development platform that offers practical, project-driven training in software testing, automation, and QA tools. With experienced mentors, real-world assignments, and placement assistance, Skillio helps learners become truly job-ready.
Testing Shastra is now Skillio — rebranded with a broader vision, the same passion for quality learning.
To get more information about such IT courses from Skillio,
Contact details —
Website: https://helloskillio.com/
Address: 504, Ganeesham E, Pimple Saudagar, Pune.
Get directions
0 notes
siva3155 · 6 years ago
Text
300+ TOP React Native Interview Questions and Answers
React Native Interview Questions for freshers experienced :-
1. What is React Native? React native is an open-source JavaScript framework designed by Facebook for native mobile applications development. It is based on a JavaScript library-React. React Native saves your development time as it enables you to build real and native mobile apps within a single language – JavaScript for both Android and iOS platforms, such that code once, run that on any platform, and the React Native App is ready for use with native look and feel. 2. Why use React Native? There is the following list of React Native features behind its use: Easy to use. Open-source framework Cross-platform compatibility Code Sharing Use a common language – JavaScript for cross-platform development. Faster Development Saves Time and efforts Gives Native look and feel 3. What are the advantages of React Native? React Native is based on “Learn Once Write Everywhere” approach to equip developers with a tool that only needs to be learned once, just in a single language and then can be reused on both iOS and Android mobile platform. React Native offers cross-platform development and a real experience to developers allowing them to build only one app with effectively 70% code sharing between different platforms. React Native helps in faster development. Building one app instead of two using a common language gives speedier app deployment, delivery, and quicker time-to-market. React Native exists with essential components for ending of native apps as the app development ends with native look and feel. React Native has a large community of developers for its security. The developers are always ready to fix bugs and issues that occur at any instant. They improve the performance of React Native from time to time with the best practices possible. React Native supports Live and Hot Reloading. Both are different features. Live Reloading is a tool that helps in compiling and reading the modified files. Hot Reloading is based on HMR (Hot Module Replacement) and helps to display the updated UI content. 4. List the essential components of React Native. These are the following essential components of React Native: View is the basic built-in component used to build UI. Text component displays text in the app. Image component displays images in the app. TextInput is used to input text into the app via the keypad. ScrollView is a scrolling container used to host multiple views. 5. What are the cons of React Native? React Native is still a new development platform as compared to iOS and Android platforms. It is still immature, i.e., in an improvement stage and impacting negatively on apps. Sometimes, React Native built-in apps face performance problem if there is a requirement of advanced functionality. In that case, they don’t perform well as compared to native apps. React Native has a steep learning curve for an average learner as it is not more comfortable in comparison to other cross-platform apps. It is because of existing JSX (JavaScript Syntax extension) in which HTML and JavaScript get combined and make learning challenging for average ones. React Native is based on JavaScript library which is fragile and creates a gap in the security robustness. As an expert’s point of view, React Native is not secure and robust for building highly confidential data apps like Banking and Financial apps. 6. How many threads run in React Native? There are two threads run in React Native: JavaScript thread Main UI thread 7. What are props in React Native? props pronounced as the properties of React Native Components. props are the immutable parameters passed in Presentational Component to provide data. 8. What are React Native Apps? React Native Apps are not web apps; they are the real and native mobile applications built-in a single language with the native components to run on mobile devices. 9. List the users of React Native? There are thousands of React Native built-in apps. Here is the list of those apps: Facebook Facebook Ads Manager Instagram F8 Airbnb Skype Tesla Bloomberg Gyroscope Myntra UberEats 10. For what purpose XHR module used in React Native? XHR module implements XMLHttpRequest to post data on the server.
Tumblr media
React Native Interview Questions 11. Can we use Native code alongside React Native? Yes, we can use a native code alongside React Native for task completion, and several limitations can also overcome in previous versions like Titanium. 12. Are React Native built-in mobile apps like other Hybrid Apps which are slower in actual than Native ones? React Native designed as a highly-optimized performance-based framework that builds real mobile apps with native components. Facebook is the best-suited example of high performance based app built-in React Native. 13. What is the difference between React and React Native? React is a JavaScript library while React native is a framework based on React. js used for building UI and web applications while React Native is used for creating cross-platform native mobile apps. Both uses synonymous tags such as
are the tags in React.js and are the tags in React native. js uses DOM for path rendering of HTML tags while React Native uses AppRegistry for app registration. 14. What is the difference between React Native and Native Script? React Native uses only a single core development language- JavaScript while Native Script can use any of these languages- Angular, Vuejs, TypeScript, and JavaScript. React Native has faster development speed than Native Script. React Native exists with reusable components that developed at once can be used at different mobile platforms and accelerates mobile app development while Native Script exists with a less number of plugins among which some pass improper verification. React Native performs high as compared to Native Script. React Native is React based and uses virtual Dom for faster UI updation while Native Script uses slower Angulas, Vuejs, and TypeScript. Native Script exists with a box of various themes that shorten the gap between the different platform UIs while React Native doesn’t live with predefined themes; you get default look and feel by the devices. 15. Can we combine native codes of Android and iOS in React Native? Yes, we can do this as React Native fluently combines the components of both iOS and Android written in Swift/ Objective-C or Java. 16. What is the point of StyleSheet.create() in react native? In React Native, StyleSheet.create() send the style only once through the bridge to avoid passing new style object and ensures that values are immutable and opaque. 17. Why React Native has very clear animations? The animated API of React Native was designed as serializable so that users can send animations to native without going through the bridge on every frame. Once the animation starts, a JS thread can be blocked, and the animations will still run fluently. As the code converted into native views before rendering, the animations in React native will run smoothly, and the users get bright animations. 18. Differentiate between the React component and the React element. React component is a class or function that accepts input and returns a React element while React element displays the look of React Component Instance to be created. 19. Why React Native use Redux? Redux is a standalone state management library that React Native use to simplify data flow within an app. 20. Which node_modules will run in React Native? How to test for this? In React Native, node_modules as any pure JavaScript library that does not rely on Node.js runtime modules, and does not rely on web-specific concepts like window.location.pathname will run fine. But be conscious as there exists no way to test for this with Babel- it doesn’t scan these libraries for offending dependencies. A module that uses window.location.pathname may fail at runtime in a different unexpected place. 21. What is Virtual DOM and how it works in React Native? Virtual Dom is an in-memory tree representation of the real DOM with lightweight elements. It provides a declarative way of DOM representation for an app and allows to update UI whenever the state changes. Working Virtual DOM lists elements and their attributes and content. It renders the entire UI whenever any underlying data changes in React Native. Due to which React differentiates it with the previous DOM and a real DOM gets updated. 22. What is InteractionManager and what is its importance? InteractionManager is a native module in React native that defers the execution of a function until an “interaction” finished. Importance React Native has JavaScript UI thread as the only thread for making UI updates that can be overloaded and drop frames. In that case, InteractionManager helps by ensuring that the function is only executed after the animations occurred. 23. What is the point of the relationship between React Native and React? React is a JavaScript library. React Native is a framework based on React that use JavaScript for building mobile applications. It uses React to construct its application UI and to define application business logic. React updates a real DOM by tree diffing and allows React Native to work. 24. What are the similarities between React Native and React? React.js and React Native share same lifecycle methods like componentDidMount same state and prop variables same component architecture similar management libraries like Redux 25. Describe HOC. HOC (High Order Components) in React is the functional programming methodology for reusing component logic. takes a component as an argument and returns a new component It is a pattern evolved from React’s compositional nature to decompose the logic into simpler and smaller reusable functions. 26. Define Native apps. Native app is a software program for a specific mobile device that is developed on a particular platform in a specific programming language like Objective-C/Swift for iOS and Java for Android. It can use device-specific hardware and software as built on a particular device and its OS. It uses the latest technology such as GPS and provides optimized performance. 27. What are Hybrid Apps? Hybrid applications are the web applications developed through HTML, CSS, JavaScript web standards and wrapped in a native container using a mobile WebView object. These apps are easier to maintain. 28. What are refs in React? When to use Refs? Refs are escape hatch that provides a direct way to access DOM nodes or React elements created in the render method. Refs get in use when To manage focus, text selection, or media playback To trigger imperative animations To integrate with third-party DOM libraries 29. What does a react native packager do? A react native packager does a few things: It combines all JavaScript code into a single file It translates any JavaScript code that your device don’t understand (e.g., JSX or some of the newer JS syntax) It converts assets like PNG files into objects that can be displayed by an Image 30. What is NPM in React Native? npm installs the command line interface in React Native. npm install -g react-native-cli 31. What are “props” and “state”? “Props” and “state” are both plain JavaScript objects used to control data inside the components. props short for “properties.” Immutable parameters -> Unchangeable inside the component. Set by their parent and fixed for the whole lifetime of a component. Get passed to the Presentational component. state Mutable parameters -> Changeable inside the component. Get handled within the container component. Can’t be accessed and modified outside the component. 32. What is Style? The style prop is a plain JavaScript object use to making style of React Native application. There are two ways to style your element in React Native application. style property: adds styles inline. external Stylesheet: enables us to write concise code. 33. How To Handling Multiple Platforms? React Native smoothly handles multiple platforms. The large numbers of the React Native APIs are cross-platform so that one React Native component will work seamlessly on both iOS and Android. It provides the ways using which you can easily organize your code and separate it by platform: Platform module to detect the platform in which the app is running and platform-specific file extensions to load the relevant platform file. 34. When would you use a class component over a functional component? We use class component if our component has state or a lifecycle method(s). Otherwise, we use a Functional component. 35. How React Native handle different screen size? React Native offers many ways to handle different screen sizes: Flexbox Flexbox is designed to provide a consistent layout on different screen sizes. It offers three main properties: flexDirection justifyContent alignItems Pixel Ratio exists in the official documentation with the definition such that we can get access to the device pixel density by using PixelRatio class. We will get a higher resolution image if we are on a high pixel density device. An ethical principle is that multiply the size of the image we display by the pixel ratio. Dimensions easily handle different screen sizes and style the page precisely. It needs to write the code only once for working on any device. 36. Are all React components usable in React Native? Web React components use DOM elements to display (ex. div, h1, table, etc.), but React Native does not support these. We will need to find libraries/components made specifically for React Native. But today React is focusing on components that can be shared between the web version of React and React Native. This concept has been formalized since React v0.14. 37. What is the challenge with React Native? Working across separate Android and iOS codebases is challenging. 38. Does React Native use the same code base for Android and iOS? Yes, React Native uses the same code base for Android and IOS. React takes cares of the native components translations. For example A React Native ScrollView uses native ScrollView on Android and UiScrollView on iOS. 39. Thus React Native is a native Mobile App? Yes, React Native compiles a native mobile app using native app components. React Native builds a real mobile app that is indistinguishable from an app built using Objective-C or Java. 40. What is Gesture Responder System? The gesture responder system manages the lifecycle of gestures in the app. Users interact with mobile apps mainly through touch. They can use a combination of gestures, such as tapping on a button, zooming on a map, sliding on a widget or scrolling a list. The touch responder system is required to allow components to negotiate these touch interactions without any additional knowledge of their parent or child components. 41. How can React Native integrate more features on the existing app? React Native is great to start a new application from scratch. However, React Native works well to add new features to an existing native app. It needs some steps to add new React Native based features, screen, views, etc. The specific steps are different for different platform you’re targeting. Set up directory structure. Install JavaScript dependencies. Configuring permissions. Code integration. Test your integration. 42. What is the storage system in React Native? React Native uses AsyncStorage class to store data in key-value pair which is global to all app. AsyncStorage is a JavaScript code which is a simple, unencrypted, asynchronous and persistent. React Native also uses separate files for iOS and RocksBD or SQLite for Android. Using AsyncStorage class, you must have a data backup, and synchronization classes as data saved on the device is not permanent and not encrypted. 43. How React Native load data from server? React Native provides the Fetch API which deals networking needs. React Native uses componentDidMount lifecycle method to load the data from server. fetch('https://mywebsite.com/mydata.json') Other Networking libraries which interact with server are: XMLHttpRequest API WebSockets React Native Questions and Answers Pdf Download Read the full article
0 notes
siva3155 · 6 years ago
Text
300+ TOP HIBERNATE Interview Questions and Answers
HIBERNATE Interview Questions for freshers experienced :-
1. What are the benefits of ORM tool? ORM is helpful in automatically generating keys, managing transaction, hiding SQL queries details, and developing applications in quick manner. 2. Provide the list of collection types in Hibernate? Set, Map, Bag, List and Array are the different types of collections in Hibernate 3. What are the two cache types in Hibernate? First level cache and Secondary level cache are the types of cache in Hibernate. 4. What is session interface? Hibernate session which performs database entities manipulation is represented by session interface. Activities carried on by session interface are handling persistence phases, retrieving the persisted ones, and transaction separations management. 5. List out the core interfaces available in Hibernate? Criteria, Transaction, Session Factory, Query, Configuration, and Session are the core interfaces available in Hibernate. 6. Describe the steps to create database application using Hibernate? Steps to create Database application using Hibernate: Write the Java object Create a mapping file. This displays the relationship between the database and attributes. Deploy the Hibernate API to store persistent objects. 7. Provide the list of Hibernate support databases? HSQL, MySQL, FrontBase, Informix Dynamic Server, DB2, Sybase SQL Server, Oracle, and PostgreSQL are the Hibernate support databases. 8. What are the two (2) components available in Hibernate configuration object? Class Mapping Setup and Database Connection are the two (2) components of Hibernate configuration object. 9. What is the syntax to create SQL query in Hibernate? The syntax to create SQL query in Hibernate is “Session.createQuery”. 10. What is the syntax to add criteria to the SQL query? The syntax to create criteria to the SQL query is “Session.createCriteria”.
Tumblr media
HIBERNATE Interview Questions 11. Do you think the extension ‘.hbm.xml’ is mandatory for all the hibernate mapping file to work properly? No, the extension ‘.hbm.xml’ is not mandatory for all the hibernate mapping file as it is just a convention. 12. What is POJOs? POJO stands for Plain Old Java Objects. These are java beans which has proper setter and getter methods for every property. Instead of Java classes, the usage of POJOs leads to a well-constructed and effective code. 13. List out the advantages of Hibernate template? Hibernate template is useful is automating the exception handling and session closing. Also, you can have a simplified communication with hibernate session. 14. What is session.save() in hibernate? The method session.save() is used to save a record when it is unique with its related primary key. If the primary key is already existing in the table, this method will not allow to insert. 15. Explain saveOrUpdate() in hibernate? The method saveOrUpdate() method is helpful in inserting a new record when the primary key is unique. If the primary key is already existing in the table, this method will update the record. 16. What is the syntax to retrieve hibernate statistics? Use the syntax “SessionFactory.getStatistics()” to retrieve the hibernate statistics. 17. Provide the list of ORM levels available in Hibernate? Medium Object Mapping, Pure Relational, Full Object Mapping and Light Object Mapping are the ORM levels available in Hibernate. 18. Provide the mapping associations utilized in Hibernate? One-to-One Association and Many-to-Many Association are the two (2) mapping associations utilized in Hibernate. 19. What are the different methods to fetch objects from database in Hibernate? In Hibernate, you can use Criteria API, HQL, Standard SQL, and Identifier to fetch objects from database. 20. In Hibernate, what is the method to reattach the detached objects? Use the method “session.merge()” to attach the detached objects. 21. To disable second level cache in Hibernate, what are the different methods? To disable second level cache in Hibernate, you can perform any of the following: Use CACHEMODE.IGNORE Set “use_second_level_cache” to false Make use of cache provider as “cache provider as org.hibernate.cache.NoCacheProvider” 22. In Hibernate, which is the default transaction factory? The default transaction factory with Hibernate 3.2 is JDBCTransactionFactory. 23. Provide the fetching strategies available in Hibernate? Batch Fetching, Sub-select Fetching, Join Fetching, and Select Fetching are the fetching strategies available in Hibernate. 24. Explain the benefit of version property in Hibernate? To recognize whether an object is in detached or transient state, version property in Hibernate. 25. Do you think polymorphism is supported by Hibernate? Yes, hibernate purely and completely supports polymorphism. 26. List out the three (3) inheritance models available in Hibernate? Table per class hierarchy, Table per sub-class, and Tables Per Concrete Class are the three (3) inheritance models available in Hibernate. 27. What is transaction management? To manage a set of commands or statement, transaction management is used in Hibernate. 28. What is callback interface in Hibernate? To obtain even notifications from objects, hibernate callback interfaces are used. Say, for example, an even gets generated when an object is deleted or loaded, and callback interfaces send a notification. 29. Provide the various other ORM frameworks in Hibernate? The other ORM frameworks in Hibernate are TopLink and EJB from Oracle. 30. List out few Java-based frameworks which is supporting hibernate integration? Eclipse plug-ins, XDoclet Spring, Maven, and J2EE are the java-based frameworks which are supporting hibernate integration. 31. List out a few properties required to database configuration in standalone condition? hibernate.connection.url, hibernate.connection.pool_size, hibernate.connection.password, hibernate.connection.driver_class, hibernate.connection.autocommit, hibernate.dialect, and hibernate.connection.username are the few properties required to database configuration in standalone condition. 32. What is the usage of method Session.beginTransaction()? To start a unit of work and return the allied transaction object, Session.beginTransaction method is used in hibernate. 33. Provide the method to re-read a provided instance state from the underlying database? To re-read a provided instance state from the underlying database, use the method “Session.refresh”. 34. Do you think the SessionFactory is thread-safe? Yes, of-course. SessionFactory is a thread-safe and multiple threads can access the same simultaneously. 35. Do you think Session is a thread-safe object? No, it is not possible. 36. Provide the concurrency strategies in Hibernate? Non-strict read-write, Transactional, Read-only and Read-write are the concurrency strategies in Hibernate. 37. Define first level cache? First level cache is an essential cache where we can see all requests are passing. Before committing to the database, the session object maintains an object under its self-power. 38. Explain Query level cache? A cache is implemented by Hibernate which is for query resultsets, integrating meticulously with the second level cache. This is not a mandatory feature. 39. What is the method get ()? If no data found, the method get() returns the value as null and it always touches the database. Actual objects are returned by get() method. 40. Explain the method load()? If not data found, the method() throws an exception as “ObjectNotFoundException”. The load() method is often seen to hit the database and it returns proxy object. 41. Describe lazy loading? There is a process where the objects are loaded on demand basis. Hibernate 3 is a lazy loading by default. Hence, when parent objects are loaded, child objects will not be loaded. 42. Describe HQL? Similar to SQL tables, Hibernate Query Language (HQL), which is an Object-Oriented Query language, gets the java objects. HQL is a database independent. 43. Can u mention the element of hbl.xml which helps to create the primary key values automatically? Yes, the element helps to create the primary key values automatically. 44. Can u mention the element of hbl.xml which helps to map the property ‘java.util.SortedSet’ in hibernate? The element is used for mapping and ‘java.util.TreeSet’ is used for initialization. 45. Explain addjar() and addDirectory() method in Hibernate? The method addjar() and addDirectory() methods plays a vital part in streamlining a set of processes like configuration, layout, refactoring and few more. Users can easily load hibernate documents in Hibernate using these two (2) methods. 46. What is Hibernate tuning? Optimization of the Hibernate applications performance is called Hibernate tuning. By performing SQL optimization, session management, and data caching, hibernate tuning happens. 47. What is derived properties? The unmapped properties which gets calculated at runtime via expression evaluation is called derived properties. The derived expression is received from a formula with the corresponding element. 48. What is Dialect? A single file or a group of code files that irregularly explains the procedure of connecting database to a Java class. In hibernate, a dialect plays a major role of recognizing the information that takes place with the fundamental database. 49. Describe Connection Pool? The connection pool in hibernate is a group of Database connection objects which are created for handling corresponding communication with the database. 50. Which annotation is used to specify the database table? The annotation @Table helps in specifying the database table which is allied to the entity. 51. What’s General Hibernate Flow Using Rdbms? General hibernate flow involving RDBMS is as follows: Load configuration file and create object of configuration class. Using configuration object, create sessionFactory object. From sessionFactory, get one session. Create HQL query. Execute HQL query and get the results. Results will be in the form of a list. 52. How Can We Map The Classes As Immutable? If we don’t want an application to update or delete objects of a class in hibernate, we can make the class as immutable by setting mutable=false 53. What The Three Inheritance Models Are Of Hibernate? Hibernate has following three inheritance models: Tables Per Concrete Class Table per class hierarchy Table per sub-class 54. Does Hibernate Support Polymorphism? Yes, hibernate fully supports polymorphism. Polymorphism queries and polymorphism associations are supported in all mapping strategies of hibernate. 55. What’s The Use Of Session.lock() In Hibernate? session.lock() method of session class is used to reattach an object which has been detached earlier. This method of reattaching doesn’t check for any data synchronization in database while reattaching the object and hence may lead to lack of synchronization in data. 56. What Is Attribute Oriented Programming? In Attribute oriented programming, a developer can add Meta data (attributes) in the java source code to add more significance in the code. For Java (hibernate), attribute oriented programming is enabled by an engine called XDoclet. 57. What’s The Use Of Version Property In Hibernate? Version property is used in hibernate to know whether an object is in transient state or in detached state. 58. What’s The Difference Between Load() And Get() Method In Hibernate? Load() methods results in an exception if the required records isn’t found in the database while get() method returns null when records against the id isn’t found in the database. So, ideally we should use Load() method only when we are sure about existence of records against an id. 59. What Is Meant By A Named Sql Query In Hibernate And How It’s Used? Named SQL queries are those queries which are defined in mapping file and are called as required anywhere. For example, we can write a SQL query in our XML mapping file as follows: SELECT std.STUDENT_ID AS {std.STUDENT_ID}, std.STUDENT_DISCIPLINE AS {std.discipline}, FROM Student std WHERE std.NAME LIKE :name Then this query can be called as follows: List students = session.getNamedQuery("studentdetails") .setString("TomBrady", name) .setMaxResults(50) .list(); 60. What Are Different Ways To Disable Hibernate Second Level Cache? Hibernate second level cache can be disabled using any of the following ways: By setting use_second_level_cache as false. By using CACHEMODE.IGNORE Using cache provider as org.hibernate.cache.NoCacheProvider HIBERNATE Questions and Answers Pdf Download Read the full article
0 notes
siva3155 · 6 years ago
Text
300+ TOP HIBERNATE Interview Questions and Answers
HIBERNATE Interview Questions for freshers experienced :-
1. What are the benefits of ORM tool? ORM is helpful in automatically generating keys, managing transaction, hiding SQL queries details, and developing applications in quick manner. 2. Provide the list of collection types in Hibernate? Set, Map, Bag, List and Array are the different types of collections in Hibernate 3. What are the two cache types in Hibernate? First level cache and Secondary level cache are the types of cache in Hibernate. 4. What is session interface? Hibernate session which performs database entities manipulation is represented by session interface. Activities carried on by session interface are handling persistence phases, retrieving the persisted ones, and transaction separations management. 5. List out the core interfaces available in Hibernate? Criteria, Transaction, Session Factory, Query, Configuration, and Session are the core interfaces available in Hibernate. 6. Describe the steps to create database application using Hibernate? Steps to create Database application using Hibernate: Write the Java object Create a mapping file. This displays the relationship between the database and attributes. Deploy the Hibernate API to store persistent objects. 7. Provide the list of Hibernate support databases? HSQL, MySQL, FrontBase, Informix Dynamic Server, DB2, Sybase SQL Server, Oracle, and PostgreSQL are the Hibernate support databases. 8. What are the two (2) components available in Hibernate configuration object? Class Mapping Setup and Database Connection are the two (2) components of Hibernate configuration object. 9. What is the syntax to create SQL query in Hibernate? The syntax to create SQL query in Hibernate is “Session.createQuery”. 10. What is the syntax to add criteria to the SQL query? The syntax to create criteria to the SQL query is “Session.createCriteria”.
Tumblr media
HIBERNATE Interview Questions 11. Do you think the extension ‘.hbm.xml’ is mandatory for all the hibernate mapping file to work properly? No, the extension ‘.hbm.xml’ is not mandatory for all the hibernate mapping file as it is just a convention. 12. What is POJOs? POJO stands for Plain Old Java Objects. These are java beans which has proper setter and getter methods for every property. Instead of Java classes, the usage of POJOs leads to a well-constructed and effective code. 13. List out the advantages of Hibernate template? Hibernate template is useful is automating the exception handling and session closing. Also, you can have a simplified communication with hibernate session. 14. What is session.save() in hibernate? The method session.save() is used to save a record when it is unique with its related primary key. If the primary key is already existing in the table, this method will not allow to insert. 15. Explain saveOrUpdate() in hibernate? The method saveOrUpdate() method is helpful in inserting a new record when the primary key is unique. If the primary key is already existing in the table, this method will update the record. 16. What is the syntax to retrieve hibernate statistics? Use the syntax “SessionFactory.getStatistics()” to retrieve the hibernate statistics. 17. Provide the list of ORM levels available in Hibernate? Medium Object Mapping, Pure Relational, Full Object Mapping and Light Object Mapping are the ORM levels available in Hibernate. 18. Provide the mapping associations utilized in Hibernate? One-to-One Association and Many-to-Many Association are the two (2) mapping associations utilized in Hibernate. 19. What are the different methods to fetch objects from database in Hibernate? In Hibernate, you can use Criteria API, HQL, Standard SQL, and Identifier to fetch objects from database. 20. In Hibernate, what is the method to reattach the detached objects? Use the method “session.merge()” to attach the detached objects. 21. To disable second level cache in Hibernate, what are the different methods? To disable second level cache in Hibernate, you can perform any of the following: Use CACHEMODE.IGNORE Set “use_second_level_cache” to false Make use of cache provider as “cache provider as org.hibernate.cache.NoCacheProvider” 22. In Hibernate, which is the default transaction factory? The default transaction factory with Hibernate 3.2 is JDBCTransactionFactory. 23. Provide the fetching strategies available in Hibernate? Batch Fetching, Sub-select Fetching, Join Fetching, and Select Fetching are the fetching strategies available in Hibernate. 24. Explain the benefit of version property in Hibernate? To recognize whether an object is in detached or transient state, version property in Hibernate. 25. Do you think polymorphism is supported by Hibernate? Yes, hibernate purely and completely supports polymorphism. 26. List out the three (3) inheritance models available in Hibernate? Table per class hierarchy, Table per sub-class, and Tables Per Concrete Class are the three (3) inheritance models available in Hibernate. 27. What is transaction management? To manage a set of commands or statement, transaction management is used in Hibernate. 28. What is callback interface in Hibernate? To obtain even notifications from objects, hibernate callback interfaces are used. Say, for example, an even gets generated when an object is deleted or loaded, and callback interfaces send a notification. 29. Provide the various other ORM frameworks in Hibernate? The other ORM frameworks in Hibernate are TopLink and EJB from Oracle. 30. List out few Java-based frameworks which is supporting hibernate integration? Eclipse plug-ins, XDoclet Spring, Maven, and J2EE are the java-based frameworks which are supporting hibernate integration. 31. List out a few properties required to database configuration in standalone condition? hibernate.connection.url, hibernate.connection.pool_size, hibernate.connection.password, hibernate.connection.driver_class, hibernate.connection.autocommit, hibernate.dialect, and hibernate.connection.username are the few properties required to database configuration in standalone condition. 32. What is the usage of method Session.beginTransaction()? To start a unit of work and return the allied transaction object, Session.beginTransaction method is used in hibernate. 33. Provide the method to re-read a provided instance state from the underlying database? To re-read a provided instance state from the underlying database, use the method “Session.refresh”. 34. Do you think the SessionFactory is thread-safe? Yes, of-course. SessionFactory is a thread-safe and multiple threads can access the same simultaneously. 35. Do you think Session is a thread-safe object? No, it is not possible. 36. Provide the concurrency strategies in Hibernate? Non-strict read-write, Transactional, Read-only and Read-write are the concurrency strategies in Hibernate. 37. Define first level cache? First level cache is an essential cache where we can see all requests are passing. Before committing to the database, the session object maintains an object under its self-power. 38. Explain Query level cache? A cache is implemented by Hibernate which is for query resultsets, integrating meticulously with the second level cache. This is not a mandatory feature. 39. What is the method get ()? If no data found, the method get() returns the value as null and it always touches the database. Actual objects are returned by get() method. 40. Explain the method load()? If not data found, the method() throws an exception as “ObjectNotFoundException”. The load() method is often seen to hit the database and it returns proxy object. 41. Describe lazy loading? There is a process where the objects are loaded on demand basis. Hibernate 3 is a lazy loading by default. Hence, when parent objects are loaded, child objects will not be loaded. 42. Describe HQL? Similar to SQL tables, Hibernate Query Language (HQL), which is an Object-Oriented Query language, gets the java objects. HQL is a database independent. 43. Can u mention the element of hbl.xml which helps to create the primary key values automatically? Yes, the element helps to create the primary key values automatically. 44. Can u mention the element of hbl.xml which helps to map the property ‘java.util.SortedSet’ in hibernate? The element is used for mapping and ‘java.util.TreeSet’ is used for initialization. 45. Explain addjar() and addDirectory() method in Hibernate? The method addjar() and addDirectory() methods plays a vital part in streamlining a set of processes like configuration, layout, refactoring and few more. Users can easily load hibernate documents in Hibernate using these two (2) methods. 46. What is Hibernate tuning? Optimization of the Hibernate applications performance is called Hibernate tuning. By performing SQL optimization, session management, and data caching, hibernate tuning happens. 47. What is derived properties? The unmapped properties which gets calculated at runtime via expression evaluation is called derived properties. The derived expression is received from a formula with the corresponding element. 48. What is Dialect? A single file or a group of code files that irregularly explains the procedure of connecting database to a Java class. In hibernate, a dialect plays a major role of recognizing the information that takes place with the fundamental database. 49. Describe Connection Pool? The connection pool in hibernate is a group of Database connection objects which are created for handling corresponding communication with the database. 50. Which annotation is used to specify the database table? The annotation @Table helps in specifying the database table which is allied to the entity. 51. What’s General Hibernate Flow Using Rdbms? General hibernate flow involving RDBMS is as follows: Load configuration file and create object of configuration class. Using configuration object, create sessionFactory object. From sessionFactory, get one session. Create HQL query. Execute HQL query and get the results. Results will be in the form of a list. 52. How Can We Map The Classes As Immutable? If we don’t want an application to update or delete objects of a class in hibernate, we can make the class as immutable by setting mutable=false 53. What The Three Inheritance Models Are Of Hibernate? Hibernate has following three inheritance models: Tables Per Concrete Class Table per class hierarchy Table per sub-class 54. Does Hibernate Support Polymorphism? Yes, hibernate fully supports polymorphism. Polymorphism queries and polymorphism associations are supported in all mapping strategies of hibernate. 55. What’s The Use Of Session.lock() In Hibernate? session.lock() method of session class is used to reattach an object which has been detached earlier. This method of reattaching doesn’t check for any data synchronization in database while reattaching the object and hence may lead to lack of synchronization in data. 56. What Is Attribute Oriented Programming? In Attribute oriented programming, a developer can add Meta data (attributes) in the java source code to add more significance in the code. For Java (hibernate), attribute oriented programming is enabled by an engine called XDoclet. 57. What’s The Use Of Version Property In Hibernate? Version property is used in hibernate to know whether an object is in transient state or in detached state. 58. What’s The Difference Between Load() And Get() Method In Hibernate? Load() methods results in an exception if the required records isn’t found in the database while get() method returns null when records against the id isn’t found in the database. So, ideally we should use Load() method only when we are sure about existence of records against an id. 59. What Is Meant By A Named Sql Query In Hibernate And How It’s Used? Named SQL queries are those queries which are defined in mapping file and are called as required anywhere. For example, we can write a SQL query in our XML mapping file as follows: SELECT std.STUDENT_ID AS {std.STUDENT_ID}, std.STUDENT_DISCIPLINE AS {std.discipline}, FROM Student std WHERE std.NAME LIKE :name Then this query can be called as follows: List students = session.getNamedQuery("studentdetails") .setString("TomBrady", name) .setMaxResults(50) .list(); 60. What Are Different Ways To Disable Hibernate Second Level Cache? Hibernate second level cache can be disabled using any of the following ways: By setting use_second_level_cache as false. By using CACHEMODE.IGNORE Using cache provider as org.hibernate.cache.NoCacheProvider HIBERNATE Questions and Answers Pdf Download Read the full article
0 notes