10 solutions available
Question 1What is a method? Explain the various parts of a method.
Question 2How do you define and invoke a method?
Question 3Explain the role of return statement in a method?
Question 4What does void signify in the method prototype?
Question 5Explain the difference between actual and formal parameters with one example of each.
Question 6Explain static and non-static methods.
Question 7Explain the scope of variables in Java
Question 8Methods reside in a class in Java.True
Question 9The scope of a local variable is limited to the method or the block it is declared in.True
Question 10The keyword static makes a variable a class variable.True