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
NikAS [45]
3 years ago
7

g If a class named Student has a data member named gpa , and one of its member functions has a parameter also named gpa , how ca

n you refer to the data member inside that member function
Computers and Technology
1 answer:
victus00 [196]3 years ago
5 0

Answer:

By using the this keyword

Explanation:

The this keyword in java is used for pointing the current object or current variable .The this keyword is removing the ambiguity among the characteristics of the class as well as the variables with the similar name.

In the given question if the class student has member variable gpa also we have a method having the argument gpa with the help of this keyword we can refer the gpa variable inside the method .

Following are the implementation of the given question

public class Main // main class

{

 int gpa; // variable declaration

 public Main(int gpa) // constructor

 {

   this.gpa = gpa; // this keyword

 }

 public static void main(String[] args) // Main method

 {

   Main m= new Main(55); // creating object of class

   System.out.println("The Value of gpa is : " + m.gpa); // display value

 }

}

Output:

The Value of gpa is :55

You might be interested in
A client is
Vlad1618 [11]

Answer:

a computer that requests a service.

7 0
3 years ago
Read 2 more answers
What is Hadoop?
balu736 [363]

Answer:

software framework for supporting distributed data processing and storage.

Explanation:

3 0
3 years ago
What is an embedded system. Give examples
IRINA_888 [86]

Answer:

An embedded system is a part of a larger system which has either one or a limited number of dedicated functions.

It doesn't require much power to run and is cheap to make and design.

Explanation:

Examples include: cars, microwaves, traffic lights, washing machines, phones etc

6 0
3 years ago
P2p networks are most commonly used in home networks. <br> a. True <br> b. False
postnew [5]
<span>The statement that P2P networks are most commonly used in home networks is true. 
</span>P2P stands for peer-to-peer communication network. It is an example of local administration. <span> Two or more PCs share files and access to devices such as printers without requiring a separate server computer or server software with P2P type of network.</span>
6 0
3 years ago
The creation of​ __________ with digital media allows for large quantities of numerical or textual data to be searched online by
ANEK [815]

Answer:

Option A- Reference materials

Explanation:

Reference Materials A digital reference library that provides more than 600 high-quality reference books from the world's leading publishers to be searched online by data points and trends

3 0
3 years ago
Read 2 more answers
Other questions:
  • System uses a 6-bit 2’s complement signed integer representation. What is the range of decimal values it can represent?
    14·1 answer
  • What is the difference between an embedded image and an attached image
    7·2 answers
  • ​A(n) ________ database makes it possible to store information across millions of machines in hundreds of data centers around th
    14·1 answer
  • Which of the following is a group of email names and addresses used for mass distribution of a message?
    5·1 answer
  • A cashier distributes change using the maximum number of five dollar bills, followed by one dollar bills. For example, 19 yields
    15·2 answers
  • The interprets the data while it is in RAM​
    8·1 answer
  • PLS I NEED HELP Question 6<br> 1 pts<br> What is NOT a built-in function in python?
    5·1 answer
  • A computer is performing a binary search on the sorted list of 7 numbers below. What is the maximum number of iterations needed
    15·1 answer
  • In which generation microprocessor was developed short answer of computer science​
    7·1 answer
  • Which terms represent the two types of client requirements?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!