Can the method lastDayOfMonth be changed to be a static method by just changing the header to the following?
private static int lastDayOfMonth()
A) No.It could no longer access the month instance variable.
B) No.A class cannot have both static and non-static methods.
C) Yes.No other change is necessary.
D) Yes, but it must be changed to public as well.
Correct Answer:
Verified
Q57: Consider the following code snippet:
Q58: When are statements in a class-level static
Q59: Suppose an object is intended to store
Q60: In which of the following cases could
Q61: In order to solve complex tasks, you
Q63: A theater needs a TicketCounter to keep
Q64: Consider the Checker class below.
Q65: A new method, getMonthName, to get the
Q66: Which of the following is not a
Q67: A new class is proposed to collect
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents