At my last interview(it was a phone interview) I was asked: "Which is the time period in which you can learn Java?". I've answered that I believe that in 2-3 month I'm able to write good code for non-fancy/regular applications. After that I observed that the employer took a long break and switched to other questions. Now, I'm asking you, what you've answered if you were in my place.

PS: I didn't worked a lot with Java(2 weeks), so I don't think that a person who is saying something like "I can learn Java in 2 days" is fair with him/herself.

  • Simple, Are you a fast learner? You Said NO.
    – Aditya P
    Mar 26, 2011 at 13:34
  • @AdityaGameProgrammer - I believe that you did not read my PS.Please define 'fast learner'
    – RBA
    Mar 26, 2011 at 13:54
  • Did you get the job?
    – c_maker
    Mar 26, 2011 at 14:10
  • A good programmer can just pick up java syntax in a few hours. Especially someone strong with OOP. Now, getting used to it, getting proficient enough to write good code and most importantly understanding the little nuances of any language can take a long long time. Its been 5 years and I still don't think I know enough C#
    – gideon
    Mar 26, 2011 at 16:04
  • @giddy, agree. The Java Runtime is very big and I would expect a Java developer - even a junior one - to know at least the core presented in the Oracle Java Tutorial.
    – user1249
    Mar 26, 2011 at 17:47

7 Answers 7


I find these sort of self-assesment questions to be a minefield because different people have different standards that they apply to themselves. So when one person says they can learn Java in 2 months and another says I can do it in a week I am more inclined to wonder what different standards of learning they apply. In general I'd assume the person giving the week estimate was optimistic or had a poor definition of what it meanst to learn a language and probably would not know the language thouroughly, as opposed to someone giving a 2 month estimate.

If the question was more along the lines of 'how long before you can write an application in Java?' you can give a more definitive timeframe since it's fairly easy to get to a stage where you can write a basic Java application because you don't need to know all the details of the language to use it. I think that most people who know another programming language could be productive with Java within a week writing applications or debugging code. Learning the frameworks, like jboss, takes more time.


The obvious answer is that "it depends". Given this quantification, a good computer engineer can probably learn a language inside a week if he has learned a similar language already. With google, SO and online tutorials, learning new languages has become much easier than what I think it would take a decade or two ago.

EDIT1: As evidence for this statement, I learned C# and elementary ASP.NET in a period of 2 weeks, and built a small site which could store and look-up data in MS-SQL server. I had no experience in C#, none with OOP-based server languages, and I spent a lot of time doing other (non-programming things).

  • 1
    the SCJP book has aprox 1000 pages. if you did not worked before with Java\C++, I don't think a week is enough.
    – RBA
    Mar 26, 2011 at 13:56
  • 1
    But how much of the book do you need to do most things? How much would you need if you already know C#(or some other memory managed OOP language)?
    – apoorv020
    Mar 26, 2011 at 14:02
  • indeed, if you put the problem in this way, yes, 90% from the programmers can program in Java.
    – RBA
    Mar 26, 2011 at 14:20
  • 1
    There's a difference between "able to throw something working together" and "able to use language, libraries, etc. well and idiomatically".
    – user7043
    Mar 26, 2011 at 15:20
  • well, the interviewer seemed to ask about the 1st part, so I gave the corresponding answer. IMO, the 2nd part would come with years of practice, regardless of what languages you know.
    – apoorv020
    Mar 26, 2011 at 16:41

I'd say you said the right thing. The time span sounds reasonable. But you don't know why the interviewer asked that question:

  • Maybe they need to have something to show at a trade show in 3 months - then they need someone who can write code in a few weeks. Even if it's a worse developer, in the long run.
  • Maybe they need someone to train other team members - you wouldn't want to do that when you're still learning the language yourself
  • Maybe they're the kind of company that expects highly complex projects done in completely unrealistic timespans - then you're probably better off not working for that company

It depends on your prior experience and the nature of the assignment.

If you already know a language like C or C++, then you can pick up the bulk of Java syntax in less than a day. It's mainly a matter of learning the class library (which is elephantine) and some best practices. If you don't have any prior programming experience, or your experience is in a language like Scheme or Haskell, it may take you a week or so to pick up the syntax.

The nature of the assignment determines the rest. Is it a single-threaded, non-graphical, server side app that basically shoves data around? You're probably good to go in a couple of days. Is it a multi-threaded, graphically-driven client that's using fifty different communications protocols to talk to a bunch of different servers? That will take longer.


At first you have to better define "learn Java", does that mean "being productive" or "knowing every thing about java (being an expert)".

I assume the interviewer only need to know on long time you may need to be productive.

And this depends on what computer languages you already know.

If you only know one imperative language like Fortran, you may need several months. But if you already know, say, C++ and Ocaml, you might be able to become productive with java in a week.


"Learn Java" is a quite vague. The Java language and core libraries can be managed in a couple of months; I would expect a good experienced programmer moving to Java to be reasonably productive in Java in a week or so. However, there is a huge amount of technology associated with Java: Ant, Hibernate, Spring, JBoss, Tomcat, EJB, JAXB, Jersey, etc. It could take a while to master all of those.


For questions like that it is generally always a good idea to ask them to clarify and define what they mean in regards to learning Java and then adjust your honest assessment on the basis of what they are looking for as a response. Likewise, how they answer could also give you some insight into what sort of employer they might be; remember, you are interviewing them as much as they are interviewing you.

In regards to the response you gave, I think it is actually a pretty fair answer although you could have hedged your bets by saying something along the lines of:

I feel that it would take me two to three months to be reasonably well versed in the language and to be able to independently develop programs without much help; however, I could likely learn the basic syntax and be able to follow what existing code is doing within n number of days.

This would then answer their questions in two ways in that you are giving them an idea of when you might be useful to them (i.e. the initial learning time) followed by when you think you might achieve a reasonably level of competence with the language. However, as sashang noted, these questions are a bit of a minefield in that you really don't know what they are asking unless you ask them for clarification. If they don't want to give you clarification then it could be a sign that they might not be the ideal employer as it is reasonable for an employee to be able to expect to ask their supervisor or someone else they are working with for clarification on an assignment.

Not the answer you're looking for? Browse other questions tagged or ask your own question.