Learning to program in java. Already implemented some code, based on tutorials that I met on the Internet. Those. I needed a task, I was looking for some examples and sorted out the code, complementing and modifying it to fit my needs. However, with the documentation I worked a little. And so I got to the point that I need to write a regular class that would connect to an HTTP server (I created the server on the vert.x platform using the tutorial from the official documentation).

There are tutorials on the network, no doubt, but I want to learn how to use the documentation myself (after all, oracle has an excellent database for all APIs) and, based on it, write some things from scratch. And so I open the page on the websocket API, I see a long list of methods and interfaces with classes. And then ... in general, the feeling that I look like a ram at a new gate, my eyes run away from the diversity. Yes, I read the description of the methods, but I don’t understand how to link them to each other. And it makes me angry, because I want to learn how to use the documentation. Please give a few tips, or a direction, what to study.

Ps. A small addition to the anticipation of possible comments: "uh, yes go to Google, you're a noob." Yes, I am a noob, I know that, but I am a motivated noob who is willing to learn. And I would like to hear the advice of experienced people who were also newcomers and also delved into it. thank

Closed due to the fact that it is necessary to reformulate the question so that it was possible to give an objectively correct answer by the participants tutankhamun , aleksandr barakin , Pavel Parshin , user194374, D-side 27 Mar '16 at 18:29 .

The question gives rise to endless debates and discussions based not on knowledge, but on opinions. To get an answer, rephrase your question so that it can be given an unambiguously correct answer, or delete the question altogether. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • four
    You have the right approach. Javadoc is a reference, not a literature. First, take the tutorial, user guide, quick start, or whatever is there, and learn. If you need specific information on the API, methods, parameters, values ​​returned, then Javadoc. Another very useful is to see the tests, good tests themselves documentation. - enzo
  • Now there is an algorithm of actions. Many thanks - Iga

3 answers 3

The Java API primarily helps with the use of an object or its method. To study the library (yes! Googles to help you) it is better to find a tutorial article.

For many libraries there is a User Guide

See how this is implemented for the Apache libraries:

The first for a quick start, the second for online assistance during development.

    API documentation is a DIRECTORY for finding out which methods a particular class implements and their signatures with return values, available constructors, public fields, and so on. Technical information. According to the API documentation, no one has yet learned how to program.

    In order to write programs you need to learn the ability to explain to the machine, what you want from it, what language to use, this is the second thing.

    Just as you could explain that you are Vasya - both French and Evenk and Chinese, with a certain desire, because you have the skills to communicate between people. But you can see how some word is written in French in the reference book - the Russian-French dictionary, but you can hardly learn to speak French in the dictionary, because there is, apart from words, the syntax vocabulary grammar and so on. knowledge. I hope the analogy is clear.

    By the ability to write programs there is a completely different literature, like the fundamental work of Nicholas Wirth "Algorithms and Data Structures". There is also a lot of general literature on the concept of OOP, application architecture, and so on. Specifically, Java was written by Eckel, Schildt, and other honored people — you need to read them, and look at the syntax help in the documentation, not the logic and structure of the program.

      With minimal knowledge of Anglo-Saxon, you can roughly imagine what methods can be in the classroom studied by the documentation. For example, for classes that display something on the screen, there should be methods like getY() , getX , setY() , getWidth() etc.

      Based on this, you can begin to study the documentation of the k-class looking for the methods you are supposed to. The rest can be viewed to have a rough idea of ​​the possibilities available or if your assumptions about the availability of methods to them have not been confirmed.

      And in most cases, most of the methods you either do not need or their names will be so saying that they will not need to be read the description.