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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 04:20, RandomLollipop
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
image
Computers and Technology, 23.06.2019 09:20, lovely222
How to print: number is equal to: 1 and it is odd number number is equal to: 2 and it is even number number is equal to: 3 and it is odd number number is equal to: 4 and it is even number in the console using java using 1 if statement, 1 while loop, 1 else loop also using % to check odds and evens
Answers: 3
image
Computers and Technology, 23.06.2019 16:00, AM28
Does read theory have answers keys ?
Answers: 1
image
Computers and Technology, 24.06.2019 07:00, jared2461
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
You know the right answer?
Which is the instance variable in the given code? public class Person{

public intpid;

Questions in other subjects: