subject

If name is a String instance variable, average is a double instance variable, and numOfStudents is a static int variable, why won’t the following code from a class compile?public Student(String s) {name = s;average = getAverage(name);numOfStudents++;}p ublic double getAverage(String x) {numOfStudents++;double ave = StudentDB. getAverage(x);return ave;}public static void setAverage(double g) {average = g;}a. The setAverage() method can’t access the average instance variable. b.The getAverage() method can’t increment the numOfStudents variable. c.The constructor can’t increment the numOfStudents variable. d.The getAverage() method can’t call a static method in the StudentDB class.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:30
What result from the passage of this amendment
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which is the highest level of the hierarchy of needs model? a. humanity b. intrapersonal c. team d. interpersonal
Answers: 1
question
Computers and Technology, 24.06.2019 07:20
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience.ob. add presenter's notes to each slide.oc. add a video to each slide.od. save her slide presentation to a flash drive
Answers: 2
You know the right answer?
If name is a String instance variable, average is a double instance variable, and numOfStudents is a...
Questions
question
Mathematics, 02.10.2020 19:01
question
Mathematics, 02.10.2020 19:01
question
Mathematics, 02.10.2020 19:01
question
English, 02.10.2020 19:01
Questions on the website: 13722361