How can a class be accessed, If no access modifiers are
declared?

Answer Posted / ranganathkini

If a class is marked with no access modifiers then it is
given "package" access by default which means it can be
instantiated or subclasses by other classes in the same
package but it is inaccessible to classes outside the same
package.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by the value of a variable?

456


Can we instantiate interface in java?

670


Can we clone singleton class in java?

511


What is an empty string in css?

523


What is the maximum size of arraylist in java?

489






Is a class an object?

575


What are the main differences between the java platform and other platforms?

526


What is the concatenation operator in java?

576


What do u mean by variable?

561


Explain different types of wrapper classes in java?

595


What is the technique adopted to create an immutable class?

522


What type of variable is gender?

540


What happens when I use / and % with a negative numerator?

536


What is bytecode verifier?

499


What do you mean by mnemonics?

529