In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge of what the concepts of java entity class, API and interface are. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look.
1. Entity class: is what the database corresponds to in the Java code. This connection is established through a framework such as Hibernate.
Now the design is almost a table, which is equal to a class in the business. A record (usually a row of data) is an object, and a column in a row is a property of the object. (it's not easy to understand)
In this way, the background can get all the values of the object-- instead of passing an attribute as a parameter, just pass an object of this class, that is, just one parameter. The benefits are self-evident.
It has several characteristics: 1. The name of the entity class corresponds to the name of the table in the database as much as possible. two。 Entity classes should implement the java.io.Serializable interface. 3. Entity classes have properties and methods, and attributes correspond to the fields of the table in the database. The main methods are getter and setter methods.
2.API: these encapsulated functions are called API (Application Programming Interface), that is, the application programming interface, eg, which can open a file by calling the fclose () function. To put it more easily, code written by others, or compiled programs, provided to you, is called API, which has the advantage of avoiding repetition of wheels. In short, API can be seen everywhere, it shields a lot of underlying details, implements a lot of common functions, and greatly simplifies the work of programmers. Make good use of API, get twice the result with half the effort!
FAQ: suppose you want to declare a function in your form module, paste it and then run it, VB will tell you: compilation error... Declare statement is not allowed as a Public (public) member of a class or object module. .. It looks bad, but all you need to do is add a Private (private) before the declaration. Since most functions are aliased, which means you can use other names than their original names through the Alias clause, you can simply change the function name and it still works. (I don't understand)
3. Interface: declare that an interface uses the keyword interface, the content stored in the interface can only be static constants and abstract methods, and the java interface is an extension of the function. A class can implement multiple interfaces, that is, a class can have multiple functions. A class can inherit only one parent class, that is, the extends keyword can only be followed by one parent class, but it can be implemented through the implements keyword, multiple interfaces. (still don't understand thoroughly enough)
That's all of the article "what are the concepts of java entity classes, API, and interfaces?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.