Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    Many examples are out there...take a look at: baeldung.com/java-binary-tree Commented May 8, 2019 at 2:14
  • @NoChance I don't think you read my question. I know there are a lot of example on how to implement a binary tree in general. I am specifically asking where my classes should go and if I should place two classes in the same file or not. Commented May 8, 2019 at 14:16
  • OK, I guess that implementing multiple classes in the same file is not a good practice. I think you should use single file-single class. I am not a java developer but in .NET this is the best approach. It allows you not only to quickly find classes easily, but also generate separate DLLs with ease. A discussion about it is here: quora.com/Can-we-keep-more-than-one-class-in-a-single-java-file Commented May 8, 2019 at 14:54