HashMap How to achieve
Hahsmap is a non-synchronous implementation of a hash table-based map interface. This implementation provides all of the optional mapping operations, and allows null values and NULL to be used to build. This class does not guarantee the order of the mappings, especially because it does not guarantee that the order is constant.
HashMap is actually a linked-list hash of the data structure, which is the combination of arrays and linked lists.
how JAVA Hibernate works and why it should be used
hibernate is an object-relational mapping framework that has a very lightweight object encapsulation of JDBC, Make it possible to manipulate the database using object programming thinking. hibernate can be applied to any JDBC application, either in Java client programs or in servlet/jsp Web applications, and most revolutionary of all, hibernate can replace CMP in the application EJB, The task of achieving data persistence. principle: 1. By configuration (). Configure (); Read and parse Hibernate.cfg.xml profile 2. Read and parse mapping information by <mapping resource= "Com/xx/user.hbm.xml"/> in Hibernate.cfg.xml 3. through Config.buildsessionfactory ();//Create sessionfactory 4. Sessionfactory.opensession ();//Open sesssion 5.session.begintransaction ();//Create Transaction Transation 6.persistent operate Persistent Operation 7.session.gettransaction (). Commit ();//COMMIT TRANSACTION 8. Close session 9. sesstionfactory Why use: 1. encapsulates the code for JDBC access to the database, greatly simplifying the tedious repetitive code. 2. hibernate is a JDBC-based, mainstream persistence framework that is an excellent ORM implementation. HeMuch of the simplification of the DAO layer coding work 3. hibernate using the Java reflection mechanism rather than the bytecode enhancer to achieve transparency. The performance of 4. hibernate is very good, because it is a. The flexibility of the mapping is excellent. It supports a variety of relational databases, from one-to-one to many-to-many complex relationships.
HashMap How to realize the principle of/hibernate