This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring forum!

Paul Anilprem

Enthuware Software Support
+ Follow
since Sep 23, 2000
Cows and Likes
Cows
Total received
35
In last 30 days
0
Total given
2
Likes
Total received
365
Received in last 30 days
2
Total given
65
Given in last 30 days
1
Forums and Threads

Recent posts by Paul Anilprem

Congratulations, Andy! Thank you for sharing your experience.
Glad to know that our material was helpful in your preparation

Rob Spoor wrote:Lambdas can not just replace anonymous inner classes, they can also replace the need for template methods. Instead of creating an abstract base class that has abstract methods that need to be overridden, you can provide lambdas to provide that functionality.

A quick example from some code I've written some time ago; this class has a getter (String -> String), setter ((String, String) -> String) and a remover (String -> ()). Slightly simplified:

Before Java 8, I had to make this class abstract, and provide (anonymous) implementations for using a Map or System properties as a backing mechanism:



This example does seem to save you quite a bit of code but I am not sure if this is a good approach from a design perspective. You now have one class that does one thing in two different ways. I think there is an anti-pattern lurking in there somewhere Abstract class and two concrete classes looks better to me. Having an interface would probably be even better. Any thoughts?
1 week ago
Congratulations, Tiberius!
Congrtulations, Bangun! Thanks for sharing your experience
2 weeks ago
When a subclass has a method with the same signature as a method in its superclass, it is called an "override". Overriding is very different from overloading. If you are following a book, you may want to go through the chapter that talks about overriding and then this question will be easy for you to understand.
Thanks for the information, Michael. I was intrigued by your response and so I checked out their website. They indeed do not mention the cost of the training upfront. On one page they say, "Since 2001 we've trained exactly 68.075 students and asked them all to review our Accelerated Learning.".  Very interesting
1 month ago
Congratulations, Nisim! Great score.
BTW, our mock exams also cost only $10 (for desktop OR web access). They cost $15 only if you buy desktop license as well as web access.
Wow, great score!
Congratulations!!
How much did the training cost if you don't mind me asking?
1 month ago
Congratulations, Nick! Thank you for sharing your experience. It is very inspirational.

-Paul.
1 month ago
Congratulations! Great score!!
Glad to know our material was helpful in your preparation
1 month ago
Congratulations, Malik! Great score!!
Congratulations, Rich!
Glad to know our s/w was helpful in your preparation
1 month ago
JDK (Java Development Kit) is a name given to a set of tools that are used to compile java code (i.e. .java files) and run the generated .class files. As you probably know, compilation is done using the program named javac (aka the java compiler) and execution is done using the program named java. Besides these two, there are tons of other tools such as a debugger, javadoc generator, and jarsigner (take a look at C:\Program Files\Java\jdk1.8.0_121\bin directory to see what all it contains). All these things make up the "JDK". It can exist anywhere, but usually, when you install the JDK on windows, these programs and their supporting libraries reside in C:\Program Files\Java\jdk1.8.0_121\.

JRE (Java Runtime Environment) comprises a subset of the tools that come with JDK. JRE contains only those programs (and supporting libraries) that are required to run java code. JDK usually includes a JRE ( see the constituents of C:\Program Files\Java\jdk1.8.0_121\jre folder). You should notice that it doesn't contain javac.

When you say JDK and JRE physically exist, that is what you probably mean. They exist in the form of files on your system.

JVM does not physically exist because, unlike your computer, which exists in the form of a physical box with motherboard and chips, the JVM exists in memory. The java.exe program that you run when you try to "execute" your java class implements a "virtual" computer aka the "virtual machine". You can also think of a JVM as a CPU simulator. You pass your java class file as an argument to this VM so that it can execute the instructions contained in your java class file.