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
Gelneren [198K]
2 years ago
12

Which XXX declares a student's name. public class Student { XXX private double myGPA; private int myID; public int getID() { ret

urn myID; } } Group of answer choices String myName; public String myName; private myName; private String myName;
Computers and Technology
1 answer:
maw [93]2 years ago
4 0
<h2>Question:</h2>

<em>Which XXX declares a student's name. </em>

public class Student {

   XXX

   private double myGPA;  

   private int myID;

   public int getID() {

        return myID;

   }

}

<em>Group of answer choices </em>

a. String myName;

b. public String myName;

c. private myName;

d. private String myName;

<h2>Answer:</h2>

private String myName;

<h2>Explanation:</h2>

To declare a student's name, the following should be noted.

i. The name of the student is of type <em>String</em>

ii. Since all of the instance variables (myGPA and myID) have a <em>private</em> access modifier, then myName (which is the variable name used to declare the student's name) should be no exception. In other words, the student's name should also have a <em>private</em> access.

Therefore, XXX which declares a student's name should be written as

<em>private String myName;</em>

<em></em>

Option (a) would have been a correct option if it had the <em>private</em> keyword

Option (b) is not the correct option because it has a <em>public</em> access rather than a <em>private</em> access.

Option (c) is not a valid syntax since, although it has a <em>private</em> access, the data type of the variable <em>myName</em> is not specified.

Option (d) is the correct option.

You might be interested in
When IPv4 addressing is manually configured on a web server, which property of the IPv4 configuration identifies the network and
makvit [3.9K]

Answer:

subnet mask

Explanation:

A subnetwork or subnet mask is a logical subdivision of an IP network.

To find out your subnet mask, the simlest way around it is to is to run a simple command line in windows.

Simply press the Windows key and “R” at the same time to open the command prompt and type “cmd” followed by “enter.” This will allow you to see your subnet mask.

In IPv4, the subnet mask 255.255. 255.0 is 32 bits and consists of four 8-bit octets. The address: 10.10. 10.0 subnet mask 255.255.255.0 this simply indicated that the subnet mask consists of a range of IP addresses from 10.10.10.0 - 10.10.10.255.

Subnet masks (IPv4) are often involved in identifying the range of IP addresses that make up a subnet, it can also be described as a group of IP addresses on the same network.

7 0
3 years ago
Are self driving cars essential for the future of transportation
azamat
Yes, I think so at least because what about those who can't physically drive? They would want the experience of being in the driver's seat.
6 0
3 years ago
What is the difference between algorithm and flowchart​
Tomtit [17]
Flowchart - diagram created by different shapes to show flow of data
algorithm - step by step procedure to solve the problem

A flowchart is a representation of an algorithm
5 0
3 years ago
What is used in computer appliances and special-purpose applications, such as an automobile, ATM, or media player and is used fo
zlopas [31]

Answer:

Embedded Operating System.

Explanation:

Embedded OS (also called Real Time Operating System) is designed to perform a single purpose in devices that may or may not be computers that have very little computer power and little RAM size such as washing machines, ATM, media player, automobiles, and cameras.  Examples of such embedded operating system are iOS(used in Apple's mobile devices), Symbian, Palm OS and Window OS.

Since they are used in single-purpose computers, they handle and perform their tasks with so much efficiency.

<em>Hope this helps!</em>

6 0
3 years ago
A sample member of the list data is a1 = ['male', True] where the second item is True if the person is on the phone.
Ira Lisetskai [31]
Answer:

0

Explanation:
In the lists, indexation starts from 0, because of that in if statement we compare item[0] which is 'male' and 'male', and then males is itterated within for loop.
8 0
2 years ago
Read 2 more answers
Other questions:
  • What is intensity? this is for digital arts
    12·1 answer
  • What are scape codes and the effectes on out put
    6·1 answer
  • Net Worth is equal to assets minus liabilities. Which event will have the greatest impact (positive or negative) on one's net wo
    9·1 answer
  • When you notice a safety hazard, what should your first step be?
    12·1 answer
  • Program 7 - Circle You write ALL the code, then run it - Produce the correct output. Turn in code and screen print of successful
    15·1 answer
  • Which job role requires you to create user guides for computer products and services?
    13·2 answers
  • An example of creative curating is when a:
    9·1 answer
  • Please Help, Thank you!
    5·1 answer
  • The capability of moving a completed programming solution easily from one type of computer to another is known as ________. Grou
    15·1 answer
  • This ingredient is often used as decoration for both hot and cold dessert​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!