Manage Learn to apply best practices and optimize your operations.

Java versus C# -- no need for war, just understanding

Learning Java first may be sharp idea

Too often the debates over cheaper, faster and better deteriorate into religious wars. Just mention the sins of...

the Macintosh computer, the Linux operating system or non-Intel silicon to get the argument going. But as developers and programmers look for new jobs or move up within their own organizations, they may debate the merits of being proficient in both Java and Microsoft's C#. Yes, it's always ideal to have both, but is the ideal really necessary? Experts and at least one leading corporate user don't think so.

Products of their environment

"Writing in both languages is one thing, but that doesn't make you more qualified for runtime environments," said Kevin Jubera, manager of application development services (ADS) centers of excellence in the IT department of Ford Motor Co. "When we look at the languages themselves, they're extremely close. But the environments they run in are very different, and the knowledge required to interface to the APIs is very different."

Both Java and C# tout features like simplicity, object orientation and robustness. Microsoft describes C# as a programming language that makes it easier for C and C++ programmers to generate COM+-ready programs with type safety, garbage collection, simplified type declarations, versioning and scalability support, and other features. Java, developed by Sun Microsystems Inc., is a platform-independent, object-oriented language. Java programs are not compiled; they are interpreted as they run. Hence the repetition of "write once, run anywhere" in Sun marketing lingo.

Java's double dose

If Java appears more omnipresent, it may be because it works with a variety of server flavors, including Unix, Linux, NT and others -- a breadth that C# and .NET aspire to but have not yet achieved. Still, some consider C# to be superior because it supports attribute-based programming, operator overloading and defining custom enumerations, among other functions.

And as Tom Barnaby, lead instructor for Intertec Inc., points out, it's important to distinguish that Java is both a language and a platform, while C# is the language that uses the .NET platform. "The amount of time to learn the other language is one to two weeks. But learning the underlying platform is a much harder task and can take a couple months," said Barnaby, who does corporate training of IT personnel.

A programmer who knows only C# will not be volunteering for an appreciably different career path than one who knows only Java. Both languages target the same applications, Barnaby said. But those who choose Java will be more likely to work in a Unix environment, while C# programmers will almost certainly end up doing Windows.

"J" before "C"?

Moving from Java to C# is the easier transition to make, according to Barnaby. He estimates that it would take about a week for those fluent in Java to get comfortable with the C# syntax and three months to get familiar with the .NET platform.

Programmers and developers may need more time, if C# is their starting point. "Java might be a little more difficult for a newbie," Barnaby said. One immediate challenge is the variety of server platforms that Java runs on, as well as the wide variety of development tools for creating Java programs.

Ford's Jubera said that his company writes and handles a lot of Java 2 Enterprise Edition (J2EE) server-side applications, running either with IBM Corp.'s WebSphere or BEA Systems' WebLogic. The apps run Java code that is then presented to the user through a browser.

Jubera is very circumspect with regard to the role of C# in the future of Ford's application development. "In terms of C#, we have only some pilots in the .NET environment. They're finished now, and we're launching one of them in a few weeks," he said. Clearly, for the foreseeable future, Java will continue to be a driving force at Ford.

That should not deter programmers and developers from learning C# and, with any luck, Java and C# can avoid the either/or dichotomy at the heart of most religious wars. "Things have never been better for developers, because you can choose to learn either Java or C#, and later on you can decide to switch to the other quite easily," Barnaby said. "That's quite unlike the way other technologies have been in the past."

Terry Sweeney is a freelance writer and editor based in Los Angeles.

More on this topic:

  • C# Tips: If your C# skills could be sharper, check out these tips from the Visual Studio.NET Info Center. If you've got a tip, please share!
This was last published in February 2003

Dig Deeper on Microservices pattern, platforms and frameworks



Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.