I know that attributes can be set public, friendly or private to specify its visibility.
Is there a way I can declare a friendly method? I want it to be accessible only from objects of classes of the same package.
Thanks you, a beginner here :(.
By not entering a visiblity modifier Java uses the package private scope
Check out the following article
Edit: As mentioned in the comments, there is no way to mark a method as “friendly”. But for your needs, package-private will suffice.