GithubHelp home page GithubHelp logo

practicaljava's People

Contributors

mykolagolubyev avatar serjepatoff avatar

Watchers

 avatar

practicaljava's Issues

possible missprint - Lesson 7, page 74, section 5

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

GridBagConstraints missing fields

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.