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
What two items must be passed in a tuple to the socket module's connect method in order to connect a socket? (choose two.)
Gekata [30.6K]

The amount of data that can be read from the socket in bytes at most.

<h3>What is socket?</h3>
  • Using socket endpoints on top of the operating system, the "socket" module specifies how server and client machines can communicate at the hardware level.
  • Both connection-oriented and connectionless network protocols are supported by the "socket" API.
  • Using socket endpoints on top of the operating system, the "socket" module specifies how server and client machines can communicate at the hardware level.
  • Both connection-oriented and connectionless network protocols are supported by the "socket" API.
  • An implementation of sockets in a library allows you to use them in your software for Internet communication.

To learn more about socket, refer to:

brainly.com/question/27814017

#SPJ4

6 0
1 year ago
List pros and cons of HCI technology​
Verdich [7]
A pro of HCI technology is that its user friendly and a con about it is that you have to teach the user what to do or guide them!
8 0
3 years ago
Read 2 more answers
How much is a stock supra 1998​
saveliy_v [14]

Answer:

Hatchback Original MSRP / Price Engine

Supra 3dr LB Auto $31,078 / $29,122 6 Cylinder

Supra 3dr LB Sport Roof Auto $35,648 / $32,842 6 Cylinder

Supra 3dr LB Sport Roof Turbo Auto $38,778 / $35,903 6 Cylinder Turbo

Supra 3dr LB Sport Roof Turbo Manual $40,508 / $37,362 6 Cylinder Turbo

Explanation:

5 0
3 years ago
What is the difference between a method and a function? In what ways are they similar? Why do you think Python makes a distincti
makvit [3.9K]

Answer:

A method in python is somewhat similarto a function, except it is associated with object/classes. Methods in python are very similar to functions except for two major differences. The method is implicitly used for an object for which it is called. The method is accessible to data that is contained within the class.

5 0
3 years ago
Which of these is NOT an example of lifelong learning?
oee [108]

Answer:

B. having lunch with a friend

Explanation:

Lifelong learning can be defined as a continuous, self-motivated, and self-initiated learning activity that is typically focused on personal or professional development. Thus, it's a form of education that is undertaken throughout life with the sole aim of pursuing knowledge, competencies, and skills for either personal or professional growth and development, especially after acquiring a formal education.

Some examples of lifelong learning includes the following;

I. Reading a trade magazine.

II. Reviewing a textbook.

III. Studying an encyclopedia.

7 0
2 years ago
Other questions:
  • Read each statement below. If the statement describes a peer-to-peer network, put a P next to it. If the statement describes a s
    13·2 answers
  • IT investments can lead to developing IT capabilities and dynamic IT competencies, which can lead to achieving the following six
    5·1 answer
  • Which website can help you find antivirus software ?
    10·1 answer
  • In the language of the World Wide Web, "this page cannot be displayed" means A. your computer's software is damaged. B. the ISP
    10·2 answers
  • A different way of pronoucing the same words is called a _____
    15·1 answer
  • Can someone solve this for me please? It’s part of an escape room.
    13·2 answers
  • A university with remote campuses, which all use different service providers, loses Internet connectivity across all locations.
    12·1 answer
  • Cómo se llaman los robots que se utilizan para la exploración espacial, en medicina, en la industria, en la agricultura, los que
    13·1 answer
  • Imagine that a team of scientists test a certain hypothesis, and the experimental results show that it is false.
    6·1 answer
  • Explain the basic operations of a computer system​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!