In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "what are the basic knowledge of JAVA programming language". In daily operation, I believe that many people have doubts about the basic knowledge of JAVA programming language. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what is the basic knowledge of JAVA programming language?" Next, please follow the editor to study!
1. Will there be a memory leak in java? please briefly describe it.
Yes. Such as:
Int iJournal i2; return (i-i2); / / when I is a positive number large enough, i2 is negative enough. The result is an overflow and an error.
2. What is the mechanism for implementing polymorphism in java?
The rewriting Overriding and overloading Overloading of the method are different manifestations of Java polymorphism. Rewriting Overriding is a manifestation of polymorphism between parent and child classes, and overloading Overloading is a manifestation of polymorphism in a class.
3. What is the basic principle of garbage collector? Can the garbage collector reclaim memory immediately? Is there any way to actively notify the virtual machine for garbage collection?
For GC, when a programmer creates an object, GC begins to monitor the address, size, and usage of the object. In general, GC records and manages all objects in the heap (heap) in a directed graph. In this way, determine which objects are "reachable" and which are "unreachable." When GC determines that some objects are "unreachable", GC has the responsibility to reclaim this memory space. Sure. Programmers can manually execute System.gc () to tell GC to run, but the Java language specification does not guarantee that GC will be executed.
4. What is the difference between static variables and instance variables?
Static I = 10 / constant class An a; A. I = 10 / 10 / variable
5. What is java serialization and how to implement java serialization?
Serialization is a mechanism for dealing with object streams, which means streaming the contents of objects. The streaming object can be read and written, and the streaming object can also be transferred to the network. Serialization is designed to solve the problems caused by reading and writing to the object stream.
Serialization of the implementation: the class will need to be serialized to implement the Serializable interface, the interface does not need to implement the method, implements Serializable is just to mark the object can be serialized, and then use an output stream (such as: FileOutputStream) to construct an ObjectOutputStream (object stream) object, and then use the ObjectOutputStream object's writeObject (Object obj) method to write out the obj object (that is, to save its state), to restore, then use the input stream.
6. Is it possible to make calls to non-static methods from within a static method?
No, if it contains the object's method (); object initialization is not guaranteed.
7. When you write the clone () method, there is usually a line of code. What is it?
Clone has a default behavior, super.clone (); it is responsible for generating the correct size of the space and copying it bit by bit.
8. How to jump out of the current multiple nested loops in JAVA?
The break; return method was used.
9. What are the characteristics of List, Map and Set when accessing elements?
List holds elements in a specific order, but there are repeating elements. Set cannot have repeating elements, internal sorting. Map saves key-value values, and value can have multiple values.
10. What is J2EE?
J2EE is a multi-tier (multi-diered), distributed (distributed), component-base-based enterprise application model (enterpriese application model) proposed by Sun. In such an application system, it can be divided into different components according to their functions, and these components can be on different computers and in the corresponding tier. The hierarchy includes customer layer (clietn tier) components, web layer and components, Business layer and components, and Enterprise Information system (EIS) layer.
11. UML
Standard modeling language UML. Use case diagrams, static diagrams (including class diagrams, object diagrams and package diagrams), behavior diagrams, interaction diagrams (sequence diagrams, collaboration diagrams), implementation diagrams.
12. Name some commonly used classes, packages and interfaces, please name 5 each
Commonly used class: BufferedReader BufferedWriter FileReader FileWirter String Integer
Commonly used package: java.lang java.awt java.io java.util java.sql
Common interface: Remote List Map Document NodeList
13. What design patterns are used in the development? For what occasion?
Each pattern describes a problem that is constantly emerging in our environment, and then describes the core of the solution to the problem. In this way, you can use existing solutions countless times without having to repeat the same work. The design pattern of MVC is mainly used. Used to develop JSP/Servlet or J2EE related applications. Simple factory model, etc.
14. What are the actions of jsp? What are the functions respectively?
There are six basic actions in JSP
Jsp:include: introduce a file when the page is requested.
Jsp:useBean: find or instantiate a JavaBean.
Jsp:setProperty: sets the properties of JavaBean.
Jsp:getProperty: outputs the properties of a JavaBean.
Jsp:forward: redirect the request to a new page.
Jsp:plugin: generate OBJECT or EMBED tags for the Java plug-in based on the browser type.
At this point, the study of "what are the basics of the JAVA programming language" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.