More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know.
Ans. Keywords are the reserved words that have a pre defined meaning for a compiler whereas modifiers are the type of keywords that modifies the state or definition of a programming construct.
for, while are keywords but not modifiers.
private , public , final , abstract etc are keywords as well as modifiers.
Help us improve. Please let us know the company, where you were asked this question :
Ans. synchronized is a keyword and a modifier. The synchronized keyword is used to indicate that a method can be accessed exclusively by one thread at a time.
Help us improve. Please let us know the company, where you were asked this question :
Ans. Access modifiers are the java reserved keywords that changes the access privileges on a class , method , element etc. For example - public , private and protected.
Non Access modifiers are the java modifiers other than access modifiers. For example - static , final, abstract, synchronized, transient, volatile etc.
Help us improve. Please let us know the company, where you were asked this question :