![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
interview
文章平均质量分 77
iloveflowerll
这个作者很懒,什么都没留下…
展开
-
How HashMap works in Java
Read more: http://javarevisited.blogspot.com/2011/02/how-hashmap-works-in-java.html#ixzz1uZl9vwENHow HashMap works in Java or sometime how get method work in HashMap is common interview questions ...原创 2012-05-11 23:40:49 · 71 阅读 · 0 评论 -
How to sort an array,mid of linkedlist, reverse int
A common mistake for a beginner to Java is to try and write some more or less complex method for sorting an array when in fact it can be done with just one line of code.The Arrays class has a static...原创 2012-06-13 07:47:01 · 93 阅读 · 0 评论 -
Lazy initialization
http://www.javapractices.com/topic/TopicAction.do;jsessionid=6E104A048475638493BA555238EC17F4?Id=34[code="java"]Lazy initialization is a performance optimization. It's used when data is deemed t...原创 2012-06-14 22:48:20 · 99 阅读 · 0 评论 -
Implementing hashCode; Transaction.java
[code="java"]Below is the syntax highlighted version of Transaction.java from § Algorithms. /************************************************************************* * Compilation: javac Tran...原创 2012-06-14 23:43:03 · 79 阅读 · 0 评论 -
Immutable objects
[code="java"]Immutable objects are simply objects whose state (the object's data) cannot change after construction. Examples of immutable objects from the JDK include String and Integer. Immutable...原创 2012-06-14 23:49:38 · 122 阅读 · 0 评论 -
Arrays.fill with multidimensional array in Java
[code="java"]How can I fill a multidimensional array in Java without using a loop? I've tried:double[][] arr = new double[20][4]; Arrays.fill(arr, 0); This results in java.lang.ArrayStoreExce...原创 2012-06-15 00:09:53 · 110 阅读 · 0 评论 -
When to use Comparable vs Comparator
[code="java"]I have a list of objects I need to sort on a field, say Score. Without giving much thought I wrote a new class that implements Comparator, that does the task and it works. Now looking...原创 2012-06-15 00:52:46 · 76 阅读 · 0 评论 -
Java Collection summary
Collection:List、Set Map:HashMap、HashTable 如何在它们之间选择 一、Array , Arrays Java所有“存储及随机访问一连串对象”的做法,array是最有效率的一种。 1、 效率高,但容量固定且无法动态改变。 array还有一个缺点是,无法判断其中实际存有多少元素,length只是告诉我们array的容量。 2、Jav...原创 2012-06-16 02:40:12 · 95 阅读 · 0 评论 -
interview - tal group ltd
11:30 downtown TAL group ltd meeting9:30 walk to bus stop10:05 got bus 10510:35 arrived downsview subway station11:05 arrived king station11:13 arrived 69 young street11:18 arrived TAL...原创 2012-03-09 06:38:57 · 84 阅读 · 0 评论 -
18mutithread interview question
Most of the Core Java interview questions are derived from Multi-Threading & Collections framework. This post is a collection of some good questions in threads area which I came across and thought of ...原创 2012-03-14 03:32:46 · 124 阅读 · 0 评论 -
Java各类型转换
各种数字类型转换成字符串型: String s = String.valueOf( value); // 其中 value 为任意一种数字类型。 字符串型转换成各种数字类型: String s = "169"; byte b = Byte.parseByte( s ); short t = Short.parseShort( s ); int i = Integ...原创 2012-06-13 05:25:44 · 79 阅读 · 0 评论 -
string functions
[code="java"]import java.util.*;public class AppendEle { public List getAppendList(List inputList) { List result = new ArrayList(); StringBuilder tsb = new StringBuilder(); for (int...原创 2012-06-13 00:09:22 · 83 阅读 · 0 评论 -
String array to arraylist
There are some important things to note with the solutions given above: Garrett's solution, with Arrays.asList() is efficient because it doesn't need to copy the content of the array. This met...原创 2012-06-13 00:07:05 · 233 阅读 · 0 评论 -
Difference between HashMap and HashTable? Can we make hashmap synchronized?
This question oftenly asked in interview to check whether candidate understand correct usage of collection classes and aware of alternative solutions available. 1. The HashMap class is roughly equ...原创 2012-05-12 01:32:51 · 64 阅读 · 0 评论 -
How to use Comparator and Comparable in Java? With example
Read more: http://javarevisited.blogspot.com/2011/06/comparator-and-comparable-in-java.html#ixzz1uaFRiHo5What is Difference between Comparator and Comparable in Java question was asked in a Test p...原创 2012-05-12 02:21:17 · 71 阅读 · 0 评论 -
10 example of using ArrayList in Java >>> Java ArrayList Tutorial
ArrayList in Java is most frequently used collection class after HashMap in Java. Java ArrayList represents an automatic resizable array and used in place of array. Since we can not modify size of an ...原创 2012-05-12 02:37:30 · 107 阅读 · 0 评论 -
Top 30 Programming interview questions
Programming questions are integral part of any java or C++ programmer or software analyst interview. No matter on which language you have expertise it’s expected that you are familiar with fundamental...原创 2012-05-12 02:48:16 · 79 阅读 · 0 评论 -
How to override equals method in Java
Object class holds some very interesting method which is applicable at object level and one of them is equals () which we are going to discuss in this article. equals () method is used to compare the ...原创 2012-05-12 02:57:59 · 119 阅读 · 0 评论 -
Write a String Reverser (and use Recursion!)
Java Interview questions: Write a String Reverser (and use Recursion!)Interviewing developers for a programming job is hard and tedious. There are some excellent Guides, like the Joel Guerilla Gui...原创 2012-06-07 03:03:32 · 105 阅读 · 0 评论 -
OO Design books -good website
I’m always on the search on good interview questions as I’m doing a lot of IT recruiting. Sometimes in interviews I talk about books the candidate has read recently, to gain some insight into his inte...原创 2012-06-07 03:13:58 · 95 阅读 · 0 评论 -
programming with String
Question:1) Write code to check a String is palindrome or not?以下是我一开始写的CODE,后来仔细一看就有很多问题了:public class CheckStringPalindrome { String original; public CheckStringPalindrome(String ...2012-06-12 01:43:17 · 77 阅读 · 0 评论 -
core java interview summary
http://blog.sina.com.cn/s/blog_3f4dc73b0100afub.html原创 2012-06-12 04:11:26 · 74 阅读 · 0 评论 -
interview - question univ
1, how many sand on the beaches of the earth?2, how to get answer 2006*2008 - 2007*20073, trace log 4, when you encounter your unfamily error, how to handle it?5, collections ( Map has...原创 2012-03-15 23:34:55 · 68 阅读 · 0 评论