Menu

[solved] – Question 76871

5.1 A method in Java is a block of statements that has a name and can be executed by calling (also called
invoking) it from some other place in your program. Explain two types of methods. (6 marks)
5.2 Methods have a unique name and follow the same naming rules as variables; explain the rules for
naming methods. (4 marks)
5.3 Write a complete Java program called Display that has a void method called ShowMessage() that accepts a string
parameter msg. The method call in the main program should produce the following output:
It’s a nice day! (10 marks)

Expert Answer


OR


Leave a Reply

Your email address will not be published. Required fields are marked *