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, 22.06.2019 01:00, keasiabradley
Search the web for two examples of digital art that you like. the examples must be from different mediums (example: one digital photo and one computer animation not two computer animations). compose an essay for each example you choose about why the piece appeals to you, and identify the medium used.
Answers: 1
image
Computers and Technology, 22.06.2019 19:20, ChaosMind
Write a program that reads a file consisting of students’ test scores in the range 0–200. it should then determine the number of students having scores in each of the following ranges: 0–24, 25–49, 50–74, 75–99, 100–124, 125–149, 150–174, and 175–200. output the score ranges and the number of students. (run your program with the following input data: 76, 89, 150, 135, 200, 76, 12, 100, 150, 28, 178, 189, 167, 200, 175, 150, 87, 99, 129, 149, 176, 200, 87, 35, 157, 189.)
Answers: 3
image
Computers and Technology, 23.06.2019 09:50, tatumleigh04
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
image
Computers and Technology, 24.06.2019 01:30, shonnybenskin8
Hazel has just finished adding pictures to her holiday newsletter. she decides to crop an image. what is cropping an image?
Answers: 1