This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!

Ivan Jozsef Balazs

Rancher
+ Follow
since May 22, 2012
Cows and Likes
Cows
Total received
6
In last 30 days
0
Total given
0
Likes
Total received
125
Received in last 30 days
0
Total given
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ivan Jozsef Balazs

"equals" is inherited from Object. The other methods of Comparator are static or default.  
1 month ago
java.util Interface Comparator<T>

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
1 month ago

Mike London wrote:



You have the string stringToConvert, encode it into a sequence of bytes using the UTF-8 encoding, then create a string from this sequence assuming it is a sequence of bytes using the platform's default charset. Don't we smell some fish around here?
9 months ago

Tim Holloway wrote:__FILE__ and __LINE__



Nobody prevents us from running Java (pre-) code through a C(++) precompiler :-)
9 months ago
The try-with-resources construct is useful for resource management.

By the way constructors and destructors are useful, even though you could argue against them saying "there are design principles for proper initialization and deinitialization".
9 months ago

Tim Holloway wrote:
And Linux tries to support NTFS, despite the fact that Microsoft hasn't always been transparent about how it works.



I saw on some Microsoft programming forums discussions on NTFS which were based on the Linux NTFS driver: it happened to be the available source for information.
1 year ago

Tim Holloway wrote: Unix/linux are always sensitive to upper/lower case in filenames.



I heard Linux supporting file systems like VFAT...
1 year ago

Campbell Ritchie wrote:But what is going to happen if you return null and try to use it? If you do more than simply print it out, you are risking an Exception.



Well, if you return something only seemingly useful, then you risk using that non-sensical value and this might be even worse than having an indication that something went wrong via the NPException.

If you search for something then in some way or other you have to cope with the case when it is not found: let it be through examinig for null, for a nonsensical sentintel value, a return code, whatnot.
1 year ago

Tim Holloway wrote:
That wasn't a CDC, was it?



It was a Bull DPSx where x=8 or so... It was int, long, maybe even long long ago :-)
I programmed it in Fortran and I accidentally came across the bytes' bit width: it did not really matter on this level.
1 year ago
However 9 does not report 1.9 any longer:

java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)

java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
1 year ago
I once worked on a system with 36-bit machine words consisting of 4 9-bit bytes.
1 year ago
Sun (there used to be this company that, among other things, invented Java) defined that there will be Java versions 1.* as long as the class file format remains the same.
But this bit of information is fading away...
1 year ago
If memory serves me right, the possibilty to leave out the type on the right hand side was introduced with Java 1.8
1 year ago
It seems a Java version issue like 7 vs 8. Are you sure you are running the same Java version in the command like as within the IDE?
1 year ago