Question

Since I started to learn Java recently I would like to be clear on some terms. As I learn, subroutine can be called as a method ... Subroutine is an instruction that consists of the sequence of "statements" enclosed between braces... from my understanding main method public static void main (String[] args)

is subroutine am I right? Thanks in advance

Was it helpful?

Solution

Yes you are right. Method is an object oriented jargon for subroutine. A method is a subroutine or function that you can call on an object in an OO language.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top