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
nevsk [136]
3 years ago
14

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

in Java by: __________
Computers and Technology
2 answers:
Klio2033 [76]3 years ago
4 0

Answer:

using the private access specifier on the class fields.

Explanation:

We can protect the data stored inside the object from the code outside in java by using the private access specifier on the class fields.

If the any class field is declared private it is not accessible to the objects outside that class.Private member are also not inherited in inheritance.

oee [108]3 years ago
4 0

<em>using the private access specifier on the class methods  </em>

<h2>Further explanation </h2>

Java is an OOP (Object Oriented Programming) paradigm programming language that can be run on computers with 32-bit or 64-bit systems. One software that operates the Java programming language is NetBeans IDE 7.2.

Private is the code that matches the name, this access is private. in other words, data and methods can only be accessed by the class they have.

Protected is an access code that makes a data or method that is defined with this level of access can be accessed by classes that have it only and also classes that include having descendants or Encapsulation data

Private Access

<em>public class StudentRecord </em>

<em>{ </em>

<em>         // basic access to variables </em>

<em>         private int name; </em>

<em> </em>

<em>          // basic access to the method </em>

<em>          private String getName () { </em>

<em>                      return name; </em>

<em>           } </em>

<em>} </em>

<em> </em>

In the example above, the variable name and the method getName () can only be accessed by the internal methods of the class.

Protected Access

<em>public class StudentRecord </em>

<em>{ </em>

<em>         // access to variables </em>

<em>         protected int name; </em>

<em> </em>

<em>          // basic access to the method </em>

<em>          protected String getName () { </em>

<em>                      return name; </em>

<em>           } </em>

<em>} </em>

In the example above, the variable name and the getName () method can only be accessed by internal class methods and subclasses of the StudentRecord class.

Learn More

private protected in Javascript brainly.com/question/13133829

method and class in javascript brainly.com/question/13148975

Details

Class: High School

Subject: Computers and Technology

Keywords: javascript, private access, protected

You might be interested in
The cell address ZZ123 means
mafiozo [28]
The range of cells from zz1 to zz23
7 0
2 years ago
Read 2 more answers
Our Client, a renowned trading company, suffered a sudden, devastating power outage that caused their server to cease functionin
Norma-Jean [14]

Answer:

Explanation:

I will consult the following strategies:

Step 1: Being a discerning consultant I should be knowing what exactly has caused the drive to get corrupted.

Step 2: After examining the current state of the hard drive I will explain the actual problem to the client in a very lucid and eloquent manner whether it is feasible to retrieve the lost data or it is beyond repair.

Step 3: Identify a solution to the problem with things at my disposal(finding a right tool).

Step 4: apply the solution found to retrieve the data from the hard drive.

Step 5: submitting the retrieved data from the corrupt drive to the customer and advocating them the preventive measures for future reference.

The above five steps will work perfectly to resolve the issue faced if followed with great care and being heedful of the situation at hand.

6 0
3 years ago
What additive keeps engines clean by preventing contaminates and deposits from collecting on surfaces? a. Friction modifiers b.
White raven [17]

Answer is: Dispersants


Explanation:

Dispersants keep contaminants (e.g. soot) suspended in the oil to prevent them from coagulating. Anti-foam agents inhibit the production of air bubbles and foam in the oil which can cause a loss of lubrication, pitting, and corrosion where entrained air and combustion gases contact metal surfaces.

So that's why the answer is: Dispersants

7 0
3 years ago
Read 2 more answers
CIST 1122 Project 2 Instructions
NikAS [45]

Answer:

it is suppost ro be at

least 20 tb

Explanation:

5 0
2 years ago
How long does a bankruptcy affect your financial reputation
Diano4ka-milaya [45]
It effects it until it is refilled to its normal amount
3 0
3 years ago
Other questions:
  • Advancements in technology that might be helpful for individuals who need accommodations to perform computer tasks include _____
    15·2 answers
  • When activated, an Excel object has all the features of an Excel
    8·2 answers
  • Which of the following is a popular open source intrusion detection system that runs on SmoothWall?? Synchronous Dynamic Random
    6·1 answer
  • If there are 1 to 30 rows the program should: Calculate and display the average of all of values read into the array Calculate a
    6·1 answer
  • As part of the systems engineering development team, use IDEF0 to develop a functional architecture. The functional architecture
    13·1 answer
  • What is the FTC used car rule
    12·1 answer
  • Where is the BIOS stored?<br><br> CPU<br> CMOS<br> RAM<br> Northbridge
    13·2 answers
  • What do you hope will be in/added GTA 6?
    13·1 answer
  • Denise found a volume of documents in the trash bin that contained individuals, names, social security numbers and years of birt
    14·1 answer
  • write a program that asks the user for a month number and displays the number of days that month has?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!