What is the meaning of public in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at the University of Cambridge, Lives in Cambridge, UK.
public is a Java keyword which declares a member's access as public. Public members are visible to all other classes. This means that any other class can access a public field or method. Further, other classes can modify public fields unless the field is declared as final .
2023-05-10 14:09:45
评论(499)
Helpful(122)
Helpful
Helpful(2)

Alexander Davis
QuesHub.com delivers expert answers and knowledge to you.
public is a Java keyword which declares a member's access as public. Public members are visible to all other classes. This means that any other class can access a public field or method. Further, other classes can modify public fields unless the field is declared as final .