Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

This question already has an answer here:

I have been doing Java for nearly a year now and I have difficulty remembering Java APIs and method names. What is the best way to remember them?

share|improve this question

marked as duplicate by gnat, GlenH7, thorsten müller, MichaelT, Martijn Pieters Apr 19 '13 at 20:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Practice. Lots of it. –  delnan Mar 29 '11 at 18:02
An IDE with autocompletion and integrated documentation helps. Not the fastest approach, but working. –  sebastiangeiger Mar 29 '11 at 18:05
Documentation should help in this case :) –  Ant's Mar 30 '11 at 13:16
Do you see remembering Java as any different from another language? Are you looking for a mnemonic? –  JeffO Nov 8 '11 at 15:48
english.stackexchange.com/questions/20455/… –  user11408 Jul 12 '12 at 10:48

7 Answers 7

up vote 12 down vote accepted

This (not remembering all things Java) is normal. Don't try to memorize the entire API, it's not worth the trouble. Keep a link to it on your browser's toolbar for when you need to look things up.

As you continue to work, you will naturally remember the elements of Java that you use most often, but sitting down and focusing on memorization of syntax, function names, etc... will not be that productive. Modern IDEs with features such as autocomplete and inline Javadoc references will help.

I would suggest it is better to learn techniques and practices than to memorize method names. A good place to start is Effective Java (It is not a book you sit and read cover to cover but it is a good Java reference book for technique). And I don't try to memorize this one either, I keep a copy on my shelf within easy reach!

share|improve this answer
It is definitely worth the trouble to at least try to.It would help in faster accessing of the required function and the knowledge of the required functions existence.Its not easy but its worth the trouble. –  Aditya P Mar 29 '11 at 18:10
+1 Letting the memorization happen on its own is great. And in my opinion the best way for it. @AdityaGameProgammer: While he says its not worth it the end result of following what he says is that you will eventually memorize it. (If its important enough in your everyday java coding) –  Tim Mar 29 '11 at 18:16
@AdityaGameProgrammer: No, it is not. Much better to learn practices and techniques than rote memorization of all functions. –  FrustratedWithFormsDesigner Mar 29 '11 at 18:17
@Now Compared to That what you are saying is True .weather or not its worth on day to day tasks depends on the ability to evaluate and measure the performance increase/decrease. –  Aditya P Mar 29 '11 at 18:31

Keep using Them.

The more you use them the more familiar you are with the codes.

Make a cheat sheet of your frequently used methods and print it out or better write it down on a piece of paper and paste it near your PC.

Cheat sheets like this for frequently used classes and their methods would be most helpful.

No one can remember all the codes/methods/syntax by heart but really good programmers can find the required class method in an instant because they know where to look it up (NOT GOOGLE). i.e language reference ,Help,live docs and such.

share|improve this answer
Thanks alot for the advice , will do that and see how it goes –  walid Mar 29 '11 at 18:16
+1 for cheatsheets, they're a good way to get started and for some people they work great. –  FrustratedWithFormsDesigner Mar 29 '11 at 18:18

Best way not to forget it is to use it. Whatever knowledge you aren't actively applying will slowly fade out of your memory. Keep working with it, if there is an area that you are struggling in, try to focus on using that area.

share|improve this answer

When I first started in the computer industry I worked with Xenix systems. For those that aren't laughing right now and don't know what Xenix was, it was a limited version of Unix. One of the things I would do when doing system upgrades was to walk each file in the filesystem and determine what had to be backed up to be restored after the upgrade was complete. All this was pre yum/rpm/and so forth days.

The point is in those days the number of files I had to go through was limited in scope, and this could be done. For example 'ls /usr/bin' only took one screen. Things have changed, and if you get someone who says they know all the *nix commands, then they are probably lying. The same is true for language API's

As Java (and other languages) get increasingly complicated, your ability to keep all this in your head will decrease. The trick to being productive is

  1. Use the methods, and fully understand what you do know.
  2. Get proficient in using reference materials. Organize your reference materials and links. That way when you want to find something, you know where to look.
  3. Explore the library, continue to learn what else there is that the language offers. Never be satisfied with what you know, there is always more to be learned.
share|improve this answer

Totally agree with @FrustratedWithFormsDesigner, you don't need to remember the whole shebang but practise, and practise makes perfect. However its important you grasp the techniques and principles behind Java for e.g. as these you can also utilise when learning other languages etc.

share|improve this answer

I keep a stack of blank index cards close by, when I run into issues where I forget parts of the language that I'm using and seem to have to search for the answer when I should remember it I create a flash card. I'll write a question on one side of an index card and then put the answer on the other side. I keep the stack of flash cards on my desk and when I have a 'what should I do now' moment I pick up the stack and go through them. It really helps.

share|improve this answer

There's no need to try to memorize all the methods in Java because it's not like there are 100 or 200 methods that everyone can remember easily, so don't even try this approach.
Rather spend more time practicing the IDE, this will help a lot when designing an application.
What you should know is only the approach to access the APIs in java. Don't worry, Java is really easy.

share|improve this answer

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