Which of the following statements accurately describe the use of access modifiers within a class definition? (Select multiple)

A) They can be applied to both data & methods
B) They must precede a class's data variables or methods
C) They can follow a class's data variables or methods
D) They can appear in any order
E) They must be applied to data variables first and then to methods

Showing Answers 1 - 0 of 0 Answers

prajkta mamidwar

  • Feb 1st, 2006
 

a, b,d are only  true stmts

access modifiers r : static ,final, native ,abstract, synchronized

Modifiers determine how methods r used & modified by other classes

syntax:    <access specifier> <modifier> <return type> <method name>

here order of modifiers and specifiers is optional they can be changed

syntax:  <modifier> <access specifier> <return type> <method name>

ex;  public static add() {}

ex; public static final int n=20;

ex. public final static int n=20;

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions