r/learnjava • • 1h ago

Where can I find documentation that actually describes anything? Dev.java and docs.oracle were not useful.

I am learning using Deitel's book and I wanted to get a deeper understanding of a few concepts. Mainly how some methods work but I can't find a good resource for that. I even read the recommendations thread but I can't find what I want there.

I want something similar to the book where I can see examples and not just some text saying: "This method takes an argument and returns another one" with no deeper explanation.

1 Upvotes

10 comments sorted by

•

u/AutoModerator 1h ago

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full - best also formatted as code block
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit/markdown editor: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/IHoppo 1h ago

Java docs are fantastic. What are your problems using it?

0

u/Eva_addict 1h ago

I was trying to learn more about the toString() and what I got there is:

  • toString
  • public String toString()
  • This object (which is already a string!) is itself returned.
  • Specified by: toString in interface CharSequence
  • Overrides: toString in class Object
  • Returns: the string itself.

Wtf is this supposed to help with??

3

u/8dot30662386292pow2 1h ago

I don't understand how that does not help you? Seems like you should learn about following concepts:

  1. inheritance
  2. interfaces
  3. polymorphism
  4. method overriding

What is the exact thing you want to learn about toString, maybe I can help?

2

u/IHoppo 1h ago edited 1h ago

Can you help me understand what you don't understand please. To me, that explains everything I'd need to know to use it.

It tells you it's a public method
It tells you what it returns in this implementation.
It tells you where it's specified and what it overrides.

What more do you need?

•

u/onated2 57m ago

Best way to learn java is read the source code.

•

u/Lopsided-Dare-8119 48m ago

This is about java.lang.String.toString which does nothing interesting. See java.lang.Integer.toString for something more useful.

2

u/Automatic-Gur2046 1h ago

Horstmann core java

1

u/cainhurstcat 1h ago

I fetch things on Kagi with "two dimensional array examples java", or what ever concept you want to learn. Also "best practice" instead of "example"

1

u/aqua_regis 1h ago

Mainly how some methods work

Java is open source. Just look at the source code.