What defines function?



What defines function?..

Answer / Joshil Murmu

In Core Java, a function is defined using the 'void' or 'return-type' keyword, followed by the function name, parameter list enclosed in parentheses, and a block of code between curly braces. For example:nnpublic int add(int x, int y) {n return x + y;n}nThis defines a function named 'add' that takes two integers as arguments and returns their sum.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is the difference between the continue and break statement?

2 Answers  


Explain Stream Tokenizer?

4 Answers  


Can there be an abstract method without an abstract class?

1 Answers  


What is a class reference?

1 Answers  


Is linked list a linear or non-linear data structure?

1 Answers   Akamai Technologies,


Explain about object oriented programming and its features?

1 Answers  


What is java lang string?

1 Answers  


What does yield method of the thread class do?

1 Answers  


different between exception and error? explaim check and uncheck exception

4 Answers  


Is class forname reflection?

1 Answers  


What is a parameter in simple terms?

1 Answers  


What is a nullable field?

1 Answers  


Categories