On Oct 9, 11:40 am, Bjoern Schliessmann
<usenet-mail-0306.20.chr0n... at spamgourmet.com> wrote:
> Diez B. Roggisch wrote:
...
> >> because [Java] wanted to be new and good but took over much of C++'s
> >> syntax and made it even weirder,
> > Even weirder? Care to explain?Example:
>> int spam = 5;
>> but
>> String eggs = new String();
>> The latter seems totally unnecessary to me, as well as being too
> verbose
It is! All you have to write is
String eggs = "";
Unfortunately, the other object types don't have literals.
> why couldn't they go the simple way as in Python and
> just state
>> String eggs;
>> -- is it because in C++ it'd mean something different?
Can't be, because Java already uses the syntax for something different
than C++.