Hashtable, they do not need to synchronize their methods, and HashMap must provide synchronization.HashMap and Hashtable are mainly from three aspects.I. Historical reasons: Hashtable is based on the old dictionary class, HashMap is an implementation of the map interface introduced by Java 1.2Two. Synchronization: Hashtable is thread-safe, that is, synchronous, and HashMap is a thread program is not secure, not synchronousThree. Value: Only HashMap c
The following is a comprehensive revision of the original Java face test set and answers to the questions and answers, the original topic has a lot of repeated topics and worthless topics, there are a lot of reference to the answer is also wrong, the revised Java side Test set reference to the latest version of the JDK
First, let's talk about the differences among final, finally, and finalize. Second, can Anonymous Inner Class (Anonymous internal Class) be extends (inherited) other classes, or implements (implemented) interface (interface )? Third, the difference between Static Nested Class and Inner Class is that the more you say, the better (the more general the interview questions are ). Fourth, the difference between and. Fifth, the difference between HashMap a
Use of the 1.finalize () method2.Java Sequence of program initializationTypes of variables in 3.Java4. Constructors5. Why some interface in Java have no methodWhat is the reflection mechanism in 6.javaHow many types of objects are created in 7.java8. What is the mechanism of polymorphic implementation, compile-time polymorphism, run-time polymorphism,9.overload and override differences, as well as individua
This blog post is for fresh graduates and Java programmers working around two or three years.Why job-hopping?This is a very broad question, and everyone has an answer in mind.For example:The company's treatment is not good,Salary increases do not meet expectations,Tired of the heavy work of a business trip without daylight,The company's sister is too few,The leader is too proud,The relationship between colleagues is too much,How much does a classmate
Java Multithreading and Concurrency basics interview questions and AnswersOriginal link: http://ifeve.com/java-multi-threading-concurrency-interview-questions-with-answers/Multithreading and concurrency issues are among the questions that interviewers prefer to ask in a Java
Java test exercises, java Test
Multiple choice questions (50 questions in total, 1.5 points for each question, a total of 75 points. If multiple choice questions are incomplete or incorrect, no score is obtained .)1. The following are object-oriented features (C, D ). (Two items)A) Heavy LoadB) rewriteC) EncapsulationD
difference between collection and collections.You mustn't say that one is singular and one is plural.Collection is the upper interface of the combination class, the sub-interface has list and set, etc., Collections is a tool class under Java.util, and provides some column static methods to synchronize the collection search sort thread.Six, when to use the Assert.An API-level technician might ask this.Used in debugging and optimization to determine whether a logical expression is true or false,
This is an example that shows how to use the Join () method.Problem:Computes the value of an expression 1*2/(1+2) using Java multithreading.Solution:Use one thread to do the addition, the other to do the multiplication, and the main thread to do the division. Because there is no need for communication between threads, we only need to consider the order in which threads are executed.In the main thread, we let the addition and multiplication threads joi
[LeetCode-interview algorithm classic-Java implementation] [215-Kth Largest Element in an Array (number of K in the Array)], leetcode -- java [215-Kth Largest Element in an Array (number of K in the Array )][LeetCode-interview algorithm classic-Java implementation] [director
[LeetCode-interview algorithm classic-Java implementation] [014-Longest Common Prefix (Longest Common Prefix)], leetcode -- java [014-Longest Common Prefix (Longest Common Prefix )][LeetCode-interview algorithm classic-Java implementation] [directory indexes for all question
[LeetCode-interview algorithm classic-Java implementation] [012-Integer to Roman (number to Rome character)], leetcode -- java [012-Integer to Roman )][LeetCode-interview algorithm classic-Java implementation] [directory indexes for all questions]Original question
Given an i
[LeetCode-interview algorithm classic-Java implementation] [011-ContainerWithMostWater (the most water)], leetcode -- java [011-ContainerWithMostWater (Maximum capacity of water )][LeetCode-interview algorithm classic-Java implementation] [directory indexes for all questions
[LeetCode-interview algorithm classic-Java implementation] [008-String to Integer (atoi) (String to Integer)], leetcode -- java [008-String to Integer (atoi) (String to Integer )][LeetCode-interview algorithm classic-Java implementation] [directory indexes for all questions]
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.