Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What is the difference between formal and actual parameters?
Think about how you define and call a method.
Write a method that takes a string and prints it.
Remember to use a parameter for the string.
What type of parameter does a method receive?
Think about how Java handles variable changes within methods.
True or False: Actual parameters are defined in the method declaration.
Look back at the explanation of formal vs. actual parameters.
Design a method that takes an array of doubles and returns the average. Explain how parameter passing works in this context.
Think about the mathematical formula for calculating averages.
Write a recursive method that takes an integer and calculates its factorial. Discuss the implications of parameter passing.
Remember how recursion operates, breaking the problem down into smaller problems.
5 more questions in this section. Enroll free to practise them all.
Enroll free