开发者

Important topics/APIs list for Java interview

This is lit开发者_运维知识库tle different from what already been asked for here

I would like to know what topics/APIs are most important for Java interviews. for example -

  • Concurrency,
  • Collections

    .....and like that.

The reason is because implementations like ConcurrentHashMap (read here) have so much details in them, that one would like to discuss about them as it covers many important aspects


  • java.io - difference between streams and writers. Buffered streams.
  • java.util - the collection framework. Set and List. What's HashMap, TreeMap. Some questions on efficiency of concrete collections
  • java.lang - wrapper types, autoboxing
  • java.util.concurrent - synchronization aids, atomic primitives, executors, concurrent collections.
  • multithreading - object monitors, synchronized keyword, methods - static and non-static.


I'd say there are two things you need for every java interview:

  1. For Basic knowledge of the Language, consult your favorite book or the Sun Java Tutorial
  2. For Best Practices read Effective Java by Joshua Bloch

Apart from that, read whatever seems appropriate to the job description, but I'd say these two are elementary.

I guess these packages are relevant for every java job:

  • java.lang (Core classes)
  • java.io (File and Resource I/O)
  • java.util (Collections Framework)
  • java.text (Text parsing / manipulation)


IMHO its more important to have a firm understanding of the concepts rather than specific knowledge of the API and especially the internal workings of specific classes. For example;

  • knowing that HashMap is not synchronized is important
  • knowing how this might affect a multithreaded app is important
  • knowing what kind of solutions exist for this problem is important


I wouldn't worry too much about specific API details like individual methods of ConcurrentHashMap, unless you're interviewing for a job that is advertised as needing a lot of advanced threading logic.

A thorough understanding of the basic Java API's is more important, and books like Effective Java can help there. At least as important though is to know higher level concepts like Object Orientation and Design Patterns.

Understanding what Polymorphism, Encapsulation and Inheritance are, and when and how to use them, is vital. Know how to decide between Polymorphism and Delegation (is-a versus has-a is a decent start, but the Liskov Substitution Principle is a better guide), and why you may want to favor composition over inheritance. I highly recommend "Agile Software Development" by Robert Martin for this subject. Or check out this link for an initial overview.

Know some of the core patterns like singleton, factory, facade and observer. Read the GoF book and/or Head First Design Patterns.

I also recommend learning about refactoring, unit testing, dependency injection and mocking.

All these subject won't just help you during interviews, they will make you a better developer.


We usually require the following knowledge on new developers:

Low level (programming) questions:

http://www.interview-questions-java.com/

Antipatterns:

http://en.wikipedia.org/wiki/Anti-pattern

Design:

http://en.wikipedia.org/wiki/Design_Patterns


On some of the interviews I have been to, there is also the java.io package covered, sometimes with absurd questions on what kind of exceptions would some rarely used method declare to throw, or whether some strange looking constructor overload exists.
Concurrency is always important for higher-level positions, but I think that knowing the concepts well (and understanding them ofc) would win you more points than specific API knowledge.
Some other APIs that get mentioned at interviews are Reflection (maybe couple questions on what can be achieved with it) and also java.lang.ref.Reference and its subclasses.


I ask some basic questions ('whats the difference between a list and a set?', 'whats an interface?', etc) and then I go off the resume. If hibernate is on there 5 times, I expect the candidate to be able to define ORM. You would be surprised how often it happens that they can't. I am also interested in how the candidate approaches software -- do they have a passion for it? And it is very important that the candidate believes in TDD. Naturally, if its a really senior position, the questions will be more advanced (e.g. 'whats ThreadLocal and when do you use it'), but for most candidates this is not necessary.


Completely agree with Luke here. We can not stick to some API's to prepare for Core Java interviews. I think a complete understanding of the OOPS concept in Java is must. Have good knowledge of oops shows the interviewer that the person can learn new API's easily and quick.

Topics that should be covered are as follows:

OOPS Concept

Upcasting & DownCasting

Threading

Collection framework.

Here is a good post to get started. Core Java Interview Q & A

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜