What are methods and how are they defined?



What are methods and how are they defined?..

Answer / Aakriti Sharma

Methods in Java are functions associated with a class, objects or interfaces. They can be used to perform operations on the object or return values. Methods are defined using the 'public' access modifier (optional), followed by the method's return type (if any), method name, and method parameters enclosed in parentheses.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the meaning of nullable?

1 Answers  


How to sort double array in java?

1 Answers  


What is dynamic array in java?

1 Answers  


Does treeset use compareto?

1 Answers  


What is the difference between yield() and sleep()?

1 Answers  


What is meant by inheritance and what are its advantages?

1 Answers  


Can we create a constructor in abstract class?

1 Answers  


What are the restriction imposed on a static method or a static block of code?

1 Answers  


Is it possible to write method inside method

4 Answers   L&T,


what us Dyna action form?

4 Answers   Aithent Technologies,


Can we write class inside a class in java?

1 Answers  


What is the default size of load factor in hashing based collection?

1 Answers  


Categories