This is probably often asked at interviews. But the question is incomplete.
Author: Claude
OOP isn’t about inheritance
Any book on OOP must explain inheritance, simply because it’s an important part of OOP in many languages. And since it’s so hard to explain and understand a large part of the book will be just about inheritance. This may lead to the false impression that OOP is just about inheritance.
Regular Expressions
I often notice that many students of programming do not understand the actual meaning of regular expressions. And I have seen online tutorials and even books that do not explain properly what regular expressions are.
Continue reading “Regular Expressions”Java 8 StreamZipper
The code (it’s a single class) is on pastebin:
https://pastebin.com/R5Sx07HC
This code is from an early build of Java 8 Beta. This was removed later and no zip function exists in the final Java 8 release. Here’s the source I used:
changeset 8789:569088178418.
SmallSet
Methods to use an int as a bit set of small values. Uses 32 bits for a bit set and offers high performance for algorithms. Designed for Java 8 and compatible with common interfaces and classes.
Project Home: https://github.com/claudemartin/smallset
Misnomer: Cloneable
In my category for Java Misnomers I really should write about this silly interface.
Continue reading “Misnomer: Cloneable”Pass-By-Reference in Java
Java is Pass-By-Value. I list some alternatives.
== versus equals()
Most answers on the internet are incomplete and some are even plain wrong. I’ll try to list all differences.
Why is String immutable?
This has been answered a million times (I get a million results on google). But my answer is the most bestest!
Continue reading “Why is String immutable?”Misnomer: String.length()
The method String.length()
gives the length of the String, right? Or does it?