subject
Computers and Technology, 20.11.2020 23:50 jro20

Which is the instance variable in the given code? public class Person{

public intpid;

private double salary;

public Person (intpersonID){
pid = personID;
}

public void setSalary(double empSal){
salary = empSal;
}

public void printDetails(){
System. out. println("id : " + pid );
System. out. println("salary :" + salary);
}

public static void main(String args[]){
Person P = new Person("P1");
P. setSalary(100);
P. printDetails();
}
}

A. public intpid;
B. private double salary;
C. intpersonID
D. double empSal
E. Person P = new Person("P1");


Which is the instance variable in the given code?

public class Person{
public intpid;
private dou

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
Before you record your own voice, you should a. record other people's voices b. warm up and practice difficult names c. listen to your favorite songs d. read a transcript of a good radio news segment
Answers: 1
question
Computers and Technology, 24.06.2019 14:00
In the microsoft® access® and microsoft excel® programs, the ribbon contains tabs that are divided into with like tools in them. parts groups containers bunches
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Create a file called favorite_foods, and list your favorite foods, entering five or six or more. press enter after each favorite food so it appears on its own line (make certain you also press enter after the final food item). after the file is created, add two more foods you like that are not on the list (press enter after the final food item). view the list of foods to make certain the two items you added appear at the end of the list
Answers: 2
question
Computers and Technology, 25.06.2019 02:30
Technology has changed communications by replacing or supplementing traditional modes of communication that were primarily
Answers: 2
You know the right answer?
Which is the instance variable in the given code? public class Person{

public intpid;
Questions
question
Physics, 21.04.2021 18:30
question
English, 21.04.2021 18:30
question
Biology, 21.04.2021 18:30
question
Mathematics, 21.04.2021 18:30
Questions on the website: 13722367