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
Website hosting servers have their own unique IP address, what does this address consist of?
Alchen [17]
A. Numbers and letters
4 0
3 years ago
Computer simulations can: A. accurately predict the weather a month in advance.
loris [4]
I believe the answer is A but i am not too sure :/
7 0
4 years ago
What is the output of the code corresponding to the following pseudocode? (In the answer options, new lines are separated by com
Viefleur [7K]

Answer:

Following are the output of the given question

3 4 6 8

Explanation:

In the following code, firstly, we have declare two integer data type "X" and "Y".

  • Then, set two for loop in which first one is outer loop and the second one is the inner loop, inner loop starts from 1 and end at 2 and outer loop starts from 3 and end at 4.
  • Then, when the variable X=1 then the condition of the outer loop become true and the check the condition of the inner loop, when Y=3, than the multiplication of X and Y occur and output should be 1*3=3.
  • Then, the value of the X will remain same at time when the value of Y become false. Thrn, second time X=1 and Y=4 and output should be 4.
  • Then, X=2 because Y turns 5 so the inner loop will terminate and than outer loop will execute. Then again Y=3 but X=2 and output should be 6.
  • Then, the value of the X will remain same at time when the value of Y become false. Thrn, second time X=2 and Y=4 and output should be 8.

Finally, all the conditions of the loop become false and the program will terminate.

3 0
4 years ago
Which letter would appear in the third position of the standard wheel marking of a hard-grade wheel?
torisob [31]
B is the correct answer you are looking for 

6 0
3 years ago
Read 2 more answers
Mike Reid is on the analysis phase of a project which is developing smile shutter cameras.
zavuch27 [327]

Answer:

The correct answer to the following question will be Option C (requirement analysis).

Explanation:

This is the mechanism of identifying the clients' requirements for such an application or framework to be constructed or updated.

  • It includes almost all of the activities accomplished to determine the expectations of the various stakeholders.
  • The methodology of parameters consequently involves the analysis, reporting, testing, and management of software or program specifications.

The other three options are not related to the given scenario. So that Option C is the right answer.

8 0
3 years ago
Other questions:
  • You have an old photograph that you want to incorporate in a brochure for your antique business. To convert the photo into digit
    9·2 answers
  • A ________ is a container that provides quick access to elements at the front and the back of the list
    6·1 answer
  • Your browsing the Internet and realize your browser is not responding which of the following will allow you to immediately exit
    14·2 answers
  • python Write a program that will take a file named Celsius.dat that contains a list of temperatures in Celsius (one per line), a
    9·1 answer
  • Number Array Class
    5·1 answer
  • Which of these statements about symmetric key encryption is true? The file is encrypted with a private key and can be decrypted
    14·1 answer
  • Usually written in block style with body text aligned along the left margin
    5·2 answers
  • Theresa is not sure how nondestructive editing can be helpful in her project. Which of these is accurate about nondestructive ed
    8·1 answer
  • Which of the following is the key business objective behind the technologies implemented by PCL Construction, as discussed in th
    11·1 answer
  • a) consider the binary number 11010010. what is the base-4 representation of (11010010)2? (there is a way to do this without con
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!