it-wdsa-1c / practicaljava Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/practicaljava
Automatically exported from code.google.com/p/practicaljava
What steps will reproduce the problem?
The page 74 (Lesson 7) has the next code snippet (section 5):
import com.practicaljava.lesson7.tryit.*;
public class TestPayIncreaseInterface {
public static void main(String[] args) {
Payable[] workers = new Payable[3];
workers[0] = new Employee("John");
workers[1] = new Contractor("Mary");
workers[2] = new Employee("Steve");
for(Payable p : workers) {
((Payable)p.)increasePay(30);
}
}
}
This code wouldn't compile. You can see it on the next screenshot
http://goo.gl/SJQby
I think the code snippet may have the next form:
import com.practicaljava.lesson7.tryit.*;
public class TestPayIncreaseInterface {
public static void main(String[] args) {
Payable[] workers = new Payable[3];
workers[0] = new Employee("John");
workers[1] = new Contractor("Mary");
workers[2] = new Employee("Steve");
for(Payable p : workers) {
p.increasePay(30);
}
}
}
Its work fine and the output (http://goo.gl/kSNQp) is the same as in section 6
(page 74).
Maybe I'm wrong and I am kindly asking you for letting me know about this.
Original issue reported on code.google.com by [email protected]
on 15 Mar 2011 at 11:36
written "TextTax" instead "TestTax".
Original issue reported on code.google.com by [email protected]
on 14 Feb 2014 at 7:54
Attachments:
Listing 8-5 (page 85)
This code wouldn't compile.
GridBagConstraints constr = new GridBagConstraints();
//setting constraints for the Calculator’s displayField:
// x coordinate in the grid
constr.x=0;
// y coordinate in the grid
constr.y=0;
http://goo.gl/VO3Nc
The class GridBagConstraints has no fields x and y.
I think it's maybe the gridx and gridy fields.
Original issue reported on code.google.com by [email protected]
on 15 Mar 2011 at 11:59
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.