Computer Science, asked by justheretocopy, 10 months ago

1) Define a method. What are the two different ways of calling the methods?
2) Write the function prototype of a static method named swap, that accepts one word, one
sentence and two characters and returns true or false.

Answers

Answered by dixitareddy1234
3

Explanation:

1-For using a method, it should be called. There are two ways in which a method is called i.e., method returns a value or returning nothing (no return value). the return statement is executed.

2-Method Calling For using a method, it should be called. There are two ways in which a method is called i.e., method returns a value or returning nothing (no return value). the return statement is executed. it reaches the method ending closing brace.

Answered by ramasamhithaz
0

Answer:

for using a method it should be called three or two ways i which a method is called i.e,method retuns a value or returning nothing the retun statment is exicuted

Similar questions