Answer Posted / janet
Public: Any thing declared as public can be accessed from
any where.
Private: Any thing declared as private can't be seen
outside of it's class.
Protected: Any thing declared as protected can be accessed
by classes in the same package and subclasses in the other
packages.
Default modifier: can be accessed only to classes in the
same package.
| Is This Answer Correct ? | 11 Yes | 4 No |
Post New Answer View All Answers
What is a variable and constant?
there are N number of matchboxes numbered 1...N.each matchbox contain various number of stick.Two player can alternatevely pick some amount of stick from the higest stick containing box . The player is condidered win if there is no stick after his move.Find the final move so that the move player win. Note:In case the number of stick is equal ,pick the stick from the higest numbered box.
What is a flag value?
What is the structure of java?
Objects or references which of them gets garbage collected?
What is called module?
How do you remove an object from an arraylist in java?
How can we make sure main() is the last thread to finish in java program?
Why java doesn’t support multiple inheritances?
What is string builder?
What are advantages of using Java?s layout managers than windowing systems?
Can a class extend 2 classes in java?
What is file in java?
What is stream api in java8?
What is the string function?