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
Complete the code to finish this program to analyze the inventory for a store that sells purses and backpacks. Each record is co
Volgvan
Import csv
fileIn = open("data/bags.txt","r")
countPurse = 0
textFile= csv.reader(fileIn)
for bag in textFile:
if bag[ 1 ] == 'purse':
countPurse = countPurse + int(bag[6])
fileIn.close()
print("Number of purses:",countPurse)
5 0
2 years ago
If you have two folders open on your desktop and you want to move a file from one folder to the other, simply ________ the file
Daniel [21]

Answer:

copy

Explanation:

3 0
2 years ago
The user can close all the programs if he closes the open virtual desktop true false
steposvetlana [31]

The user cannot close all the programs if he closes the open virtual desktop.

<h3>What are virtual desktops?</h3>

A virtual desktop is a computer operating system that does not run directly on the endpoint hardware from which a user accesses it.  The desktop environment is separated from the physical device used to access it.

I call it a false desktop.

It is use to separate your work activities.

Therefore, the user cannot close all the programs if he closes the open virtual desktop.

learn more on virtual desktop here: brainly.com/question/14332029

#SPJ12

3 0
2 years ago
IF U LOVE CODING CLICK HERE!!! : )
erik [133]

Answer:

I think it is the last one. Or first. Try first though.

Explanation:

Have a Great Day.

8 0
3 years ago
Jonathan created a presentation for his workplace. He now wants to embed an audio file in the presentation. Which file format sh
viva [34]

Answer:

He can use any of the audio formats like MP3 and M4A.

Explanation:

6 0
3 years ago
Other questions:
  • You run an automobile selling company that has a popular online store on AWS. The application sits behind an Auto Scaling group
    6·1 answer
  • As an improvement of the ATX form factor over AT, shorter wires made it easier to shield them and made them capable of handling
    6·1 answer
  • _______ tools enable people to connect and exchange ideas.
    7·2 answers
  • What does it mean to compact and repair your database? What is the difference between a single
    15·1 answer
  • What are the consequences of plagiarism?
    7·2 answers
  • You’ve just finished training an ensemble tree method for spam classification, and it is getting abnormally bad performance on y
    9·1 answer
  • A student will not be allowed to sit in exam if his/her attendance is less than 75% .
    8·1 answer
  • Create a vector of structures experiments that stores information on subjects used in an experiment. Each struct has four fields
    12·1 answer
  • Which statement about analog and digital images is true?.
    15·1 answer
  • Can some one help me with this please
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!