What is the difference between a method and a procedure?



What is the difference between a method and a procedure?..

Answer / Vijay Rana

A method in programming is a function that belongs to an object or class. It has access to all variables, including both private and public ones, within the object or class. A procedure, on the other hand, does not belong to any particular object or class and does not have access to the variables of objects or classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What happens when I use / and % with a negative numerator?

1 Answers  


What is mnemonic code?

1 Answers  


HOW TO PRINT A NO IN WORDS USING WHILE LOOP THE NO WILL BE PRINTED WHEN IT WILL BE IN THE RANGE BETWEEN 1 AND 3?

1 Answers  


how many types of cloning?

4 Answers   Mobily,


where final and static variable stored?

3 Answers  


What access modifiers can be used for variables?

1 Answers  


Explain illegalmonitorstateexception and when it will be thrown?

1 Answers  


Is array passed by reference in java?

1 Answers  


What does substring mean?

1 Answers  


what is the significance of listiterator in java?

1 Answers   IBS,


What is meant by object?

1 Answers  


Why is the main method declared static?

1 Answers  


Categories