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
Your computer is crashing on a regular basis. Which of the following is an operation available to the user that should help rese
Neko [114]

Answer

System restore

Explanation

System restore is a recovery feature that helps restore your system to the previous condition or point. Most computers have system restore disks which are an advantage to the users especially when the computer clashes.These disks are very effective when it comes to restoring the system to its initial state.

6 0
3 years ago
Read 2 more answers
What symbol do you use to choose a feature for your notes on Notion?
Mandarinka [93]

Answer:

The core element of notions is called blocks from where all the content bring forth. It has around fifty blocks.

Explanation:

Notion is the newest and fastest growing productivity tools for the recent memory. Notions has been reached out to the fight club meme status. When it is plain, it is easy to use and  start. But even after it many of the users have difficulty in using this tools when it comes to the powerful cases.

There are some steps through that one can start to use this tool for their productivity.

To built the blocks

To organize the notions.

To create the habit tracker

To move the pages in notions

Data base and the views.

Type / - type table - select online- full page

4 0
3 years ago
Do the police check your mobile device during police checks?
Marat540 [252]
it depends............

4 0
3 years ago
Read 2 more answers
Do you agree that digital signatures are the best way to protect the data in question?
lutik1710 [3]

Answer:

Explained

Explanation:

Yes, I agree that digital signatures are the best way to protect the data in the date in question. A digital signature is mathematical technique used to validate the authenticity and integrity of a massage. Digital signature is far more inherent security. It is built to solve problems of tempering and impersonation of digital documents. It allows the authorized user to have authentic right, and the unauthorized person is denied access.

3 0
3 years ago
In matlab how would this specific code be written and how could I ask the user to enter a vector of coefficients for the polynom
solniwko [45]

Answer:

Explanation:

that is correct 1234

7 0
3 years ago
Other questions:
  • Write a class named Averager containing: An instance variable named sum of type integer, initialized to 0. An instance variable
    6·1 answer
  • A word or line of a paragraph at the top of a page hanging indent is called ______
    8·1 answer
  • What languages do most of the students at Miami High School speak?
    6·2 answers
  • Why do agriculture and natural resource systems vary from state to state?
    8·1 answer
  • How does voting help in a social news site?
    10·1 answer
  • Many companies use telephone numbers like 555-GET-Food so the number is easier for their customers to remember. On a standard te
    6·2 answers
  • One can find mountain ranges, elevation levels, and deserts on a physical map.
    15·2 answers
  • Interstate highway numbers Primary U.S. interstate highways are numbered 1-99. Odd numbers (like the 5 of 95) go north/south, an
    8·1 answer
  • The Ntds. dit file is a database that stores Active Directory data, including information about user objects, groups, and group
    7·1 answer
  • ________ is interpreted. Group of answer choices A. Python B. C C. C D. Ada E. Pascal
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!