Pound (£) and Dollar ($) are valid Java class names

By Steve Claridge on 2015-12-01.

This was a bit of a surprise to me, $.java and £.java are valid class names. These compile just fine:

public class $
{
} public class £
{
}

I've started using these as utility classes in some projects, containing some often-used static helper methods, the one-character class name and static method makes for a tidy calling convention that doesn't clutter up the codebase

$.eq( "one", "two" );