1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Lena [83]
3 years ago
9

Data hiding, which means that critical data stored inside the object is protected from code outside the object, is accomplished

in Java by: A. using the public access specifier on the class methods B. using the private access specifier on the class methods C. using the private access specifier on the class definition D. using the private access specifier on the class fields
Computers and Technology
1 answer:
algol [13]3 years ago
7 0

Answer:

Option (D) using the private access specifier on the class fields

Explanation:

  • The private access modifier can be used to hide the data.
  • Methods and data variables ( fields ) can be declared with the private access modifier.
  • Data hiding is a OOPS Concept which can be achieved with the private keyword (private access modifier).
  • The access modifiers are of types Public, Private, Protected and Default ( no access modifier - no need to explicitly specify the default keyword).
  • Data hiding means to hide the data, the data is contained in the class variables.So, option (d) using private access modifier on the class fields is correct option.
  • Option (A) is wrong as the using the public access modifier doesn't hide anything. It is public and is visible to the public.
  • Option (B) is wrong as using the private access modifier on the methods means it is hiding the implementation of the methods not the data.
  • Option (C) is wrong as using private access modifiers on class definition means making the classes not visible to other classes it doesn't mean data hiding as the data is contained in the class variables.
You might be interested in
The process of making raw materials into a finished product is known as
Olin [163]
1.) Business Engineering or Manufacturing :)
<span />
6 0
2 years ago
Read 2 more answers
The OSI model is currently the most widely implemented network model used to develop and build networks of any size, including t
natta225 [31]

Answer:

The correct answer to the following question will be "False".

Explanation:

  • The Open Systems Interconnection model is a conceptualization that describes and vastly simplifies a telecommunication or computer system's communication features, regardless of its inner structure and technologies underlying them.
  • This model aims is to direct manufacturers and creators so that they would modularize with the digital communication devices and computer programs they build, and to promote a consistent context that defines the roles of a network or telecom device.

Therefore, the given statement is false.

7 0
2 years ago
Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile &gt;&gt; x &gt;&gt; y;
MrMuchimi

Answer:

inFile.open("progdata.dat");

Explanation:

This command opens the file which is passed to it as an argument. We are quite used to the C++'s cin and cout functions contained in iostream library for reading and writing data, however, when working will real-life stuff, we find ourselves working with huge data saved as separate files and require our programs to read them, manipulate them and possibly write back to the files... The first operation usually carried out before a file can be read or written to is open

6 0
3 years ago
State the function of a URL in a website​
mihalych1998 [28]

Answer:

It's purpose is to access a webpage.

Explanation:

A URL contains detailed information on the webpage such as, the domain name, protocol, and path. This information directs the browser to the desired page.

3 0
3 years ago
what is the best book or website to learn mechanical machine design? . high detail ,easy to under stand .
Vadim26 [7]
WERE IS A B C D I CANT GIVE YOU ANSWER
7 0
3 years ago
Other questions:
  • A technician is troubleshooting a computer that will not communicate with any hosts on the local network. While performing a vis
    9·1 answer
  • Software that was designed to serve the needs of a specific company or organization is called:
    5·1 answer
  • What is one advantage of top-down programming design?
    13·2 answers
  • A flat-panel detector is exposed with nothing between the x-ray tube and detector. 5 images were acquired on 5 different days us
    6·1 answer
  • Many computer programs contain ____ that detail the specific instructions a computer should perform (in a specific order) to car
    9·1 answer
  • Any part of the computer that you plug into the CPU like a phone, tablet, headphones etc. are called
    5·1 answer
  • The chief intellectual property officer (CIPO) is responsible for collecting, maintaining, and distributing the organization's k
    14·1 answer
  • I think my knee....
    14·1 answer
  • What does the National Institute of Standards and Technology do? Promotes innovation by advancing measurement standards promotes
    15·2 answers
  • Susan discovers the following log entries that occurred within seconds of each other in her Squert (a Sguil web interface) conso
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!