r/learnjava • • Dec 08 '17

Calling methods of a different class query

Hi guys.

Say I have a method in class A.

I then wish to call the method from class A in public static void main(String[] args).

How would I do so?

0 Upvotes

22 comments sorted by

View all comments

6

u/throwaway_for_cause Dec 08 '17 edited Dec 08 '17

Have you ever considered doing a tutorial instead of flooding (6 posts in the last 24 hours) the subreddit?

The sidebar here has some of the best Java tutorials in existence in the Free Tutorials section.

You will need a lot more than a couple reddit posts can fill. Take a proper tutorial and learn the correct way.

The MOOC Object Oriented Programming with Java (sidebar) will teach you what you are lacking.

-4

u/[deleted] Dec 08 '17

[removed] — view removed comment

5

u/override_acid Dec 08 '17

Have you considered I have DONE a tutorial, and yet still struggled to grapple with the concepts of it?

Well, even then, the suggestion is perfectly valid and doesn't give you a permit to behave like an asshole. If a single tutorial is not sufficient, do another one, and another, and another until you understand it.