Question
Debug the section of code that follows. Check the code carefully for all possible errors and list the line numbers, the errors and write the
Debug the section of code that follows. Check the code carefully for all possible errors and list the line numbers, the errors and write the corrections to the errors as well.
Line 1 public class Device Line 2 {Line 3private String deviceType Line 4private dbl totalSales; Line 5Line 6public Device(String deviceType double totalSales) Line 7{ Line 8this.deviceType = deviceType; Line 9this.totalSales = totalSales; Line 10} Line 11public String getDevice Line 12{ Line 13return this.deviceType; Line 14} Line 15public double getTotalSales() Line 16Line 17return this.totalSales; Line 18} Line 19 }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started