I have finally joined the 21st century and downloaded the Eclipse SDK for Java development. Oooh, luxury. I don't know why I stuck with xemacs for so long!
Also: after worrying about Java generics since Java 5.0 came out, I finally bit the bullet and set to teaching myself how to use them. Result: I had it figured out within about five minutes. Easy!
Non-generic java:
Generic java:
On another note: have been exposed to the dreaded C#, which Microsoft likes to describes as an updated version of C/C++, with a few influences from Visual Basic and Java. Let's take a look at a HelloWorld program in C#:
Enough about me. How are you?
Also: after worrying about Java generics since Java 5.0 came out, I finally bit the bullet and set to teaching myself how to use them. Result: I had it figured out within about five minutes. Easy!
Non-generic java:
ArrayList a = new ArrayList();
a.add( "the" );
a.add( "quick" );
a.add( "brown" );
a.add( "fox" );
Iterator i = a.iterator();
while( i.hasNext() )
System.out.println( "Length of string is " + ((String) i.next()).length() );Which is, for one thing, ugly. (LISPs!) More significantly, it can lead to type conversion errors at runtime, when you'd much prefer to see them at compile time.Generic java:
ArrayList<String> a = new ArrayList<String>();
a.add( "the" );
a.add( "quick" );
a.add( "brown" );
a.add( "fox" );
Iterator<String> i = a.iterator();
while( i.hasNext() )
System.out.println( "Length of string is " + i.next().length() );Which is easy enough to understand — just read ArrayList<String> as "an ArrayList of type String". Iterator<String> means "an Iterator over type String", and so forth.On another note: have been exposed to the dreaded C#, which Microsoft likes to describes as an updated version of C/C++, with a few influences from Visual Basic and Java. Let's take a look at a HelloWorld program in C#:
public class HelloWorld {
public static void Main( string[] args ) {
System.Console.WriteLine( "Hello, world" );
}
}Hmmm... not fooling anyone there, Billy. It's Java through-and-through, with a few syntactic differences (for example, upper-case method names) just to piss off existing Java programmers. Teh annoy.Enough about me. How are you?
Tags:
From:
no subject
C# is almost identical to pre-5.0 Java, and so there's not much to choose between one or the other. I'd suggest learning C#, since the class libraries are more Microsoft-ish, so you should find your VB experience more applicable.
That said, with Java 5.0 the language is suddenly about twice as a) powerful and b) complicated. So perhaps give Java a try after you've got your head round C#.
(Personally, I seem to be growing into that sort of programmer who can alternate between a dozen or so programming languages without much difficulty. I take a perverse sort of pride in that, even though I'm quite obviously turning into the proverbial Jack-of-all-trades.)