Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is a method?
Think about how it helps in avoiding code repetition.
What does a return type signify in a method?
Is it a number, a string, or something else?
What is the purpose of a method in Java?
Think about the role of methods in organizing code.
Can a method return nothing in Java?
Consider how many functions you've seen that just execute actions without returning a value.
Write a Java program that utilizes method overloading to calculate the area of a rectangle and a triangle. Explain how method overloading is used in your example.
Think about how the method names can remain the same, yet the parameters differ.
Design a static method that converts degrees Celsius to Fahrenheit. Include how this will be called in the main method.
How do you declare a static method, and what is the purpose of returning a value?
7 more questions in this section. Enroll free to practise them all.
Enroll free