Re: Is there an easy way to find the right class?



Farcus Pottysquirt wrote:
The API has tons of classes and stuff right? So if I'm writing a program in Java, how would I find the right class and package? Let's say I'm writing an app and I need a class that will take a database object and store it in some sort of list that will let me easily add and delete from it. I know that ArrayList has this functionality...but that's only by experience. What about a noobie (I rank myself only slightly higher)... how would they find this out?

If I have any clues about the package I want, I go straight to the API documentation, and start reading about that package. In particular, read any package page in the documentation - it often gives major clues about which classes to use in what situations.

If not, I google:

java whatever

where "whatever" is a description of what I want to do.

Patricia
.



Relevant Pages

  • Re: (OT) In search of a definition
    ... primarily works under Windows XP, I am in search of a "good ... a package was NOT part of the language. ... without looking for something to formulate a hostile response from. ... use in Java is the same as its use in C or other languages. ...
    (comp.lang.cobol)
  • Re: (OT) In search of a definition
    ... a package was NOT part of the language. ... without looking for something to formulate a hostile response from. ... use in Java is the same as its use in C or other languages. ...
    (comp.lang.cobol)
  • building java rpm
    ... I am trying to build a java rpm based on the nosrc.rpm from jpackage.org ... chmod -R u+w bin CHANGES COPYRIGHT javaws lib LICENSE man plugin ... This package contains source files for %. ...
    (Fedora)
  • Re: Quirk with generics
    ... One place this has happened was when I said a Java class cannot have two methods with the same signature and different return types, Joshua Somebody accused me of being wrong, and I quoted chapter and verse from the JLS proving that Joshua was the wrong one. ... #* Creating four new source files within the package. ... #* Deleting the project, its package, and the four source files. ... #my IDE potentially disturbing the way I'd had it (current ...
    (comp.lang.java.programmer)
  • Re: Module/package hierarchy and its separation from file structure
    ... importing under different names, I meant exactly that. ... You could confuse Python adding a package root to sys.path and doing ... because in Java Monkey.java is a class. ...
    (comp.lang.python)