AhFai Chan wrote:In any of the old apps, I would get the color with a simple
pulic String getChassisColor() { return chassisColor;}
This does not work anymore.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
All things are lawful, but not all things are profitable.
AhFai Chan wrote:I have only one private static class using static fields and methods containing data about the user who has logged in.
All things are lawful, but not all things are profitable.
AhFai Chan wrote:please expand into an anonymous inner class
All things are lawful, but not all things are profitable.
In which case I think you should make your λs nice and simple, so they are easy to follow. I think you are better off learning λs as early in your career as possible, so you become familiar with them.AhFai Chan wrote:. . . About not using lambda: its difficult to debug, . . . .
I don't think books should use lambdas
No, the principal advantage of λs is that they allow us to use a more functional style of programming.authors can point to the advantage, being less typing . . .
AhFai Chan wrote:About not using lambda: its difficult to debug,
I don't think books should use lambdas, authors can point to the advantage, being less typing, and give examples, but for us to follow the flow of the logic, it's best not to use lambdas.
If you are trying out code samples in book, pay particular attention to the ReST APIs the authors are using.
I have imported java-json.jar into \lib folder in most of my apps, but this particular book used jsonp_1.1_api.zip which you can download here:
https://jcp.org/aboutJava/communityprocess/pr/jsr374/index.html
saves you hours of head-scratching...![]()
All things are lawful, but not all things are profitable.
Willie Smits can speak 40 languages. This tiny ad can speak only one:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|