24) Which of the following statements is true about constructors?a) Providing a constructor for a class is optional.b) You can only provide one constructor for a class.c) The body of the constructor must initialize all instance variables or the constructor will not successfully compile.d) A constructor has avoidreturn type.
25) Which of the following is a valid constructor header for thePlayerclass that accepts the player name as aparameter?
Get answer to your question and much more
26) Consider the following code to declare a constructor for thePlayerclass:public void Player(String playerName){name = playerName;}Which statement is true?
Get answer to your question and much more
27) The public constructors and methods of a class form the public _____ of the class.
Get answer to your question and much more
28) What are the operations that any programmer can use to create and manipulate objects of the class called?a) public implementationb) public interfacec) private implementationd) private interface
29)We want to change theBankAccountclass so that all accounts will have a monthly fee.When aBankAccountis created, its monthly fee is set and cannot be changed. Which of the following will properly definethe instance variablemonthlyFeethat holds the monthly fee?
Get answer to your question and much more