Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What do you need to do to call a method in Java?
Think about how to access a method defined in a class.
What does a method return?
Remember the terms 'return type' and 'void'!
What is the first step to call a method in Java?
What do we need to access the methods?
True or False: A method can return a value.
Think about the purpose of return types.
Create a class 'Temperature' with a method that converts Celsius to Fahrenheit. Then write a 'main()' method to call it and print the result.
Think about how to structure the conversion formula.
Define a class 'Bank' with a method to calculate interest based on principal and rate. Implement a 'main()' to call this method and display the interest.
Consider what variables are needed to perform the calculation.
4 more questions in this section. Enroll free to practise them all.
Enroll free