In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
The editor of this article introduces "what are the basic interview questions of big data" in detail, the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "what are the basic interview questions of big data" can help you solve your doubts? let's follow the editor's ideas to learn new knowledge.
31. Can the method of abstract be static, native or synchronized at the same time? [basic]
A: neither.
32. What is the difference between static variables and instance variables? [basic]
A: static variables, also known as class variables, are shared by the whole class. They do not depend on an object and can be accessed directly through the class name, while instance variables must depend on an instance and can only be accessed through the object.
33. Is it possible to make calls to non-static methods from within a static method? [basic]
Answer: no, if it contains the method () of the object, the initialization of the object cannot be guaranteed.
34. When you write the clone () method, there is usually a line of code. What is it? [basic]
A: Clone has a default behavior: super.clone (), which is responsible for generating the correct size of space and copying it bit by bit.
35. What is GC? Why is there a GC? [basic]
Answer: GC means garbage collection (Gabage Collection). Memory processing is a place where programmers are prone to problems. Forgetting or erroneous memory collection will lead to instability or even collapse of the program or system. The GC function provided by Java can automatically monitor whether the object exceeds the scope to achieve the purpose of automatic memory collection. Java language does not provide a display operation method to release allocated memory. Java programmers don't have to worry about memory management because the garbage collector manages it automatically. To request garbage collection, you can call one of the following methods: System.gc () or Runtime.getRuntime (). Gc ().
36. The advantages and principles of garbage collection. Two kinds of recovery mechanisms are considered. [basic]
A: a remarkable feature of the Java language is the introduction of garbage collection mechanism, which solves the memory management problem that C++ programmers have the most headache. It makes Java programmers no longer need to consider memory management when writing programs. Because of a garbage collection mechanism, objects in Java no longer have the concept of "scope", only object references have "scope". Garbage collection can effectively prevent memory leakage and effectively use the available memory. The garbage collector usually runs as a separate low-level thread to clear and collect dead or unused objects in the memory heap unpredictably. Programmers cannot call the garbage collector to garbage collect an object or all objects in real time. The recycling mechanism includes generation-by-generation replication garbage collection and marked garbage collection, incremental garbage collection.
37. What is the basic principle of the garbage collector? Can the garbage collector reclaim memory immediately? Is there any way to actively notify the virtual machine for garbage collection? [basic]
Answer: 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.
38. String s=new String ("xyz"); how many String Object have been created? [basic]
Answer: two objects, one is "xyx" and the other is a reference object s pointing to "xyx".
39. Can the interface inherit it? Can abstract classes implement (implements) interfaces? Can abstract classes inherit entity classes (concrete class)? [fundamentals]
Answer: interfaces can inherit interfaces. Abstract classes can implement (implements) interfaces, and abstract classes can inherit entity classes, but only if the entity class has an explicit constructor.
40. The similarities and differences between the interface of Java and the virtual class of C++. [basic]
Answer: because Java does not support multiple inheritance, and it is possible that a class or object needs to use methods or properties in several classes or objects, the existing single inheritance mechanism can not meet the requirements. Interfaces are more flexible than inheritance because there is no implementation code in the interface. When a class implements an interface, it implements all the methods and properties in the interface, and the properties in the interface are public static under the default state, and all methods are public by default. A class can implement multiple interfaces.
After reading this, the article "what are the basic interview questions of big data" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow 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.