Java Advanced interview including architects

Source: Internet
Author: User
Tags connection pooling garbage collection numeric modifier numeric value thread class
Java advanced interview including architectsTags: schema 2016-11-25 16:04 3090 people read comments (0) Collection report

Directory (?) [+] JDK1.5 new features    ==>>> character streams and byte stream differences, use scenarios, related classes    ==>>> thread safety concepts, Several ways to implement thread safety    ==>>> the difference between abstract classes and interfaces, the implementation principle of the scenario    ==>>> hash algorithm is used, Hashcode principle    ==>>> Error and exception difference, runtimeexception and non-runtimeexception difference     ==>>> the difference between inheritance and combination, use of scenarios    ==>>> the pros and cons of using static factory methods    ==> >> sorting algorithm, they are time complexity is how much   ==>>> database design principles, paradigms    ==>>> database commonly used coding methods are what kinds of If there are 100,000 student results information, how to get the highest score of the data, how to obtain the results of the third of the data, listed you think the best performance of the way    ==>>> serialization of the role of application scenarios, in addition to network transport     ==>>> Spring's IOC, AOP usage scenarios    ==>>> ajax ability to cross domain requests, workaround     ==>>> methods of parsing XML, their principles    ==>>> how to implement High-performance code   ==>>> If there are interface calls with other systems, but other systems have not yet been developed, how to do unit testing    ==>>> prevent duplicate submissions, there are several ways (this online a lot, you can Google) How to use the style to design a div surfaced database connection pool implementation principle,How does the request get the connection, when the connection is closed, the connection pool is destroyed or recycled    ==>>> tomcat, WebLogic, JBoss, and the role of the container     ==>>> Apache is the container, what is its function    ==>>> the difference between internal jump and external jump, the underlying implementation principle    == >>> the difference between HTTP and HTTPS    ==>>> what are the reasons for downtime, how to analyze the causes of downtime, such as: a long connection to the database ...    ==>>> on the Velocity page, why not recommend the core principles of using a macro definition    ==>>> WEBX WEBX frame and Velocity Advantage    ==>>> page If there is a screen and two control, then they have a few context   ==>>> A page that contains layout, screen, and control, and what is their loading order, is to wait for all the load to display together, or the other ...    ==>>> #if ($!a== ' true ') is there a problem, why    ==>>> Alipay How to ensure his safety, his call to the exception of what kinds of     ==>>> Project What do you think is the best thing to do    ==>>> 35.java in addition to the 8 basic types, in the virtual machine there is what kind of effect?  36. In addition to creating object surprises with the New keyword, try enumerating more than three other ways to create an instance.?  37.classloader, the JDK API, the classpath in the same web-inf in the class loading method is different.   38. Enumerate more than three garbage collection algorithms and compare their advantages and disadvantages.   39. Write code to implement a thread pool   40. Describe the principle mechanism of the JVM loading class file?  The classes in the JVM areImplemented by ClassLoader and its subclasses, the Java ClassLoader is an important Java run-time component. It is responsible for loading and reloading classes of class files at run time.   41. Try to illustrate a typical garbage collection algorithm.   42. Please write two-tree algorithm in Java, realize adding data to form two-fork tree function, and print out .  43 by First order. Please write a Java program to implement the thread connection pooling function.   44. Given a C language function, the implementation is called in the Java class.   45. How to get the length of an array.   46. Use of the access modifier "public/private/protected/default modifier"   47. What is the meaning of modifying a class or method with the final keyword?   48. Mastering the concepts of class and object, mastering the nature of object-oriented programming   49. The meaning of static variables and static methods, and how to reference a static variable or static method of a class.   50.JAVA language How to handle exception handling, keyword:thorws,throw,try,catch,finally  the Finalize () method of the 51.Object class (or its subclasses) is invoked under what circumstances.   52. Can include multiple classes (not inner classes) in a ". Java" original file.   53. Mastering the concepts of internal classes and interfaces   The use of 54.StringTokenizer classes   55. Data structure, how to traverse the elements in the list.       What data structure to use if you want to save or access data according to the key value.       to master the use of collection related interfaces and classes   56. What is the difference between using the StringBuffer class for string concatenation with the string class.   57. What is the consequence of calling the Destroy () method of the thread class.   58. Multi-threading, using what keywords to modify the synchronization method. Why the Stop () and Suspend () methods are not recommended for use.   59. The process of establishing client-server communication using Sockets   International application of 60.JAVA language, locale class,unicode  61. Describe the role of reflection mechanism   62. How to read and write a file.  about hashcode methods and equals.

A hash table This data structure must be familiar to most people, and in many places, hash tables are used to improve search efficiency. There is a method in the Java object class:

1 public native int hashcode ();

According to the declaration of this method, the method returns a numeric value of type int and is a local method, so no specific implementation is given in the object class.

Why the object class requires such a method. How does it work? Today we will discuss the Hashcode method concretely. I. The role of the Hashcode method

For a programming language that contains a container type, hashcode is basically involved. In Java, too, the main function of the Hashcode method is to work with a hash based collection, which includes HashSet, HashMap, and Hashtable.

Why do you say that? Consider a situation where you can determine whether an object already exists in the collection when you insert it into the collection. (Note: Duplicate elements are not allowed in the collection)

Perhaps most people would think of calling the Equals method to compare each one, and this approach is really feasible. But if there are 10,000 or more data in the set, if you use the Equals method to compare each one, efficiency is a problem. At this point the function of the Hashcode method is reflected, when the collection to add a new object, first call the object's Hashcode method, get the corresponding hashcode value, In fact, in the concrete implementation of HASHMAP will use a table to save the hashcode value of the object that has been saved, if the table does not have the hashcode value, it can be stored directly, no more comparisons; if the hashcode value exists, The Equals method that calls it is compared with the new element, the same words do not save, the same is the hash of other addresses, so there is a problem of conflict resolution, so the actual number of calls to the Equals method is greatly reduced, To be popular: The Hashcode method in Java is to map the object-related information (such as the object's storage address, the object's field, etc.) to a numeric value based on certain rules, which is called a hash. The following code is a concrete implementation of the Put method in Java.util.HashMap:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17-18

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.