In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces you how to understand the Java visit modifier, the content is very detailed, interested friends can refer to, hope to be helpful to you.
Java access modifiers, such as public, private, protect, default, etc.
The scope can look directly at the above and say nothing more, let's just talk about the use scenario. There is a saying that I know the truth, but I can't use it. There are also many friends in the group who say they don't know how to use it, so we will also bring the use scene in the future. Of course, the knowledge of knife is also limited. I will share what I know, and we can share it together.
Private:
Generally used in static member constants such as
Public static final String MINI= "programmer Learning Camp"
Private:
From the encapsulation point of view, the suggested variables are defined as private, and then need to be accessed by the outside world, exposing a get method
Private String mini = "programmer learning base"; public String geMini () {return mini;}
Protect:
Commonly used in architecture design to store variables common to subclasses
Public class BaseXXX {protected String mini;} public class SubXXX extends BaseXXX {public String getMini () {return mini;}} access modifiers on how to understand Java are shared here. I hope the above can be of some help and learn more. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.