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
Uhaul general mechanical questions 2021
hammer [34]

Moving or transportation tools, equipment and methods provides guidance

on the safe an efficient ways to move items.

The correct responses are;

1) (B); 2) B; 3) C; 4) A; 5) D; 6) B; 7) A; 8) B; 9) (A); 10) A; 11) C; 12) B; 13) A; 14) A; 15) B; 16) A; 17) B; 18) A; 19) (C); 20) B; 21) B; 22) A; 23) B; 24) (C); 25) B

Reasons:

1) The correct option is; (B) Withstand a heavier load and add greater stability

  • By sing two wheels on the rear of a truck, heavy loads can be hauled, and transported around corners, and bumpy roads, reducing the possibility of the load tipping the truck over, thereby keeping the truck stable.

2) The correct option is; B

  • The Phillips-head screw is cross shaped, and required a cross shaped screwdriver, which is option B)

3) The correct option is; C

  • The alternator converts mechanical rotational energy into electrical energy, and usually has a compact electrical coil and magnets within its enclosure. The alternator is option C

4) The correct option is; A

  • The rear of a truck moves in the direction the front tires are turned

5) The correct option is; D

  • Option A  and B are pliers, while option B is a spanner, all of which are used to fasten and loosen bolts and nuts. Option D is a screwdriver used to fasten and loosen screws.

6) The correct option is; B

  • The working platform on scaffold B has extra support from the diagonal braces.

7) The correct option is; A

  • The large size tires in refrigerator A increases the contact surface with the road to prevent entering into small holes

8) The correct option is; B

  • Due to the heavier load in the trailer of pick-up truck B, more force is required, to stop the truck according to Newton's Laws of motion, and therefore, a longer distance will be taken to stop by the truck, given similar conditions (magnitude) stopping force available

9) The correct option is; (A)

  • Jumping two batteries to start an automotive with a dead battery requires a Negative to Negative / Positive to Positive  connection, which is option (A)

10) The correct option is; A

  • The air filter will have a open outer rim for the free passage of air.

11) The correct option is; C

  • The scale measures the difference in weight, and the weight depends on the mass of the item. Given that the mass are equal, both weights would be equal, and therefore, the scale would be level.

12) The correct option is; B

  • The smoothest ride is closest to the most weight of the vehicle, which is located in the front, therefore, the area that gets the smoothest ride is option B

13) The correct option is; A

  • The downward pressure is given by the location of the load relative to the wheel on the trailer, that gives either a clockwise or downward moment of force when in position of option A or a counterclockwise or upward moment at B

14) The correct option is; A

  • Gear connected by belt or chain move in the same direction, therefore, the direction of wheel 3 is option A

15) The correct option is; B

  • A tire blowout will not occur because, the pressure is below the recommended pressure. However, the motion of the car will be unstable

16) The correct option is; A

  • When tightening a nut with an adjustable wrench, the direction of turning the wrench is towards the movable jaw, therefore, the option A is correct

17) The correct option is; B

  • The difference between the threads of the given tires is the depth of their grooves, therefore, the tire in option B has more thread.

18) The correct option is; A

  • When loading items on a trailer, the majority of the load should be located in the front, therefore, the correct location for loading only the washer is illustrated by the picture A.

19) The correct option is; (C)

  • The object has a lead, an insulated handle, and a electrical bulb that lights up when there is electricity, therefore, it is used for (C) Checking for electrical current travelling through a wire.

20) The correct option is; B

  • The trailer swings in the opposite direction to the truck.

21) The correct option is; B

  • The ladder in picture B is safer because it spreads more at the base

22) The correct option is; A

  • Most of the weight of the refrigerator act on the wheel in picture A than in picture B

23) The correct option is; B

  • The gear turns towards the screen on the left and away from the screen on the right, which is a direction from left to right.

24) The correct option is; (C)

  • The cotter pin is assembled last to hold the bolt in place, and cannot be assembled before the other parts as it will restrict their movement

25) The correct option is; B

The front tire should be turned in the opposite direction to the intended direction of the trailer.

Learn more here:

brainly.com/question/69628

6 0
2 years ago
What program controls the hardware and software in a computer?
larisa86 [58]
The operating system controls hardware and soft
8 0
3 years ago
Which task might be suitable for moving into a separate function so you can re-use it from multiple places in your code?
Fudgin [204]

Answer:

The answer is "All of these could make good functions ".

Explanation:

In the given question some information is missing, that is options which can be described as follows:

a. Ask the user to confirm an input with a yes/no answer

b. Sort some input data into an ordered list

c. All of these could make good functions

d. Calculate a complex mathematical expression

A method is a collection of ordered code and provides a generic code, that is used to execute a single, connected operation.

  • A good function is a function, which takes values from the user and it will sort all the data and store in memory, and whenever we call the function, it will give the values.
  • It is also used to calculate some complex values,
8 0
3 years ago
______ is used to extract knowledge from sources of data-NoSQL databases, Hadoop data stores, and data warehouses-to provide dec
Alex777 [14]

Answer: Data analytics

Explanation:

3 0
2 years ago
In python:
egoroff_w [7]

Python can be used to implement central of tendencies such as mean, median and mode using the statistic module

The program in Python, where comments are used to explain each line is as follows:

#This imports the statistics module

import statistics

#This defines the function that calculates the mode

def calcMode(myList):

   #This prints the mode

   print(statistics.multimode(myList))

#This defines the function that calculates the median

def calcMedian(myList):

   #This prints the median

   print(statistics.median(myList))

#The main method begins here

#This initializes the list

myList = []

#The following iteration gets input for the list

for i in range(10):

   myList.append(int(input()))

#This calls the calcMode method

calcMode(myList)

#This calls the calcMedian method

calcMedian(myList)

Read more about similar programs at:

brainly.com/question/25026386

8 0
3 years ago
Other questions:
  • Although the battery on your smartphone is fully charged, it drains quickly. In some instances when the phone shows that the bat
    12·1 answer
  • What cable should i be using to connect my android tablet to the pc?
    13·2 answers
  • Can somebody explain me what this code does in a few or one sentence?#include #include using namespace std;int main () { const i
    12·1 answer
  • What happens as the key length increases in an encryption application?
    8·1 answer
  • Higher-speed Ethernet technologies use an electronic device known as a Hub rather than a switch True/False
    15·1 answer
  • ____ is the most widely used language for writing system software because it combines the power of a high-level language with th
    12·1 answer
  • Write, in your own words, a one-two paragraph summary on the Running Queries and Reports tutorials. Apply critical thinking and
    10·1 answer
  • I really need help in this!!!
    11·1 answer
  • Creating a Numpy Array
    5·1 answer
  • A server is handling thousands of simultaneous connections, and proxying requests to another service. Which concurrency model is
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!