First of all, check you Java version: run "java -version" from command line.
In Java version prior to 1.5, the correct syntax is:
Long result = new Long(1L);
In java >1.5 it's done automatically. It's called "autoboxing".
The uppercase "L" tells Java that the number should be interpreted as long.