C# vs Java Part 3: The Frameworks (Network, Reflection, Security, Text)

Network Programming Both C# and Java provide framework libraries for reading and writing data to a network.  Java is again hindered by the same kind of problems it has with file IO.  It is difficult to do network programming in Java.  Let’s compare downloading a web page in both languages. Java: [sourcecode language=”java”] URL url = new URL("http://google.com"); InputStreamReader streamReader = …

C# vs Java Part 1: The Languages (Continued)

Continued from C# vs Java Part 1: The Languages Primitive Types and Boxing There are a few subtle differences here that can really throw a programmer off.  I think the best way to describe this section is by examples. In C# this is valid [sourcecode language=”csharp”] 56.ToString(); [/sourcecode] In Java it looks like this [sourcecode language=”java”] ((Integer)56).toString(); [/sourcecode] Because both …