.

Java (J2SE) vs. C#

<<

N15M0

User avatar

Newbie
Newbie

Posts: 16

Joined: Wed Jun 09, 2010 1:56 pm

Post Thu Jun 10, 2010 2:34 pm

Java (J2SE) vs. C#

I am quite fluent in Java, and I understand that apparently C# is similar(I have not attempted coding in C# before, hence this post)

Does anyone know how these two languages compare? Java runs under its own virtual machine, which can be very limiting if writing programs to use on other machines, but does C# have the same functionality?

Any input is GREATLY appreciated :)
<<

yatz

Full Member
Full Member

Posts: 222

Joined: Tue May 25, 2010 2:58 pm

Post Thu Jun 10, 2010 3:04 pm

Re: Java (J2SE) vs. C#

I may not know for sure but I have taken Application Design classes in college.

C# runs under .NET Framework, which is comparable to the JVM in usage.  The JVM though is designed to be platform-agnostic where .NET Framework typically only runs on Windows machines.  Also Java can use IDEs like NetBeans and Eclipse where C# you need Visual Studio.

In my opinion (and since I work almost exclusively with Windows environments), C# is easier to code and works better with the IDEs available.  There can be downsides to being platform-agnostic since you have to write code with this in mind.

I have used both though and cannot specifically condemn either one.  In terms of language, they are very similar.
"Live as though you would die tomorrow, learn as though you would live forever."

CCNA, MCSA, MCTS, Sec+, Net+, Linux+, CEH
<<

N15M0

User avatar

Newbie
Newbie

Posts: 16

Joined: Wed Jun 09, 2010 1:56 pm

Post Thu Jun 10, 2010 3:14 pm

Re: Java (J2SE) vs. C#

Thanx for the reply yatz,

Is there any more complexities in C# compared to Java that you know of? Or are their packages, etc the same? Also, are there any relations directly to Windows, for instance any user relational packages, any system properties, or anything else of the sorts?

:)I'd like to start coding in C# soon, very anxious...
<<

secureseve

User avatar

Jr. Member
Jr. Member

Posts: 79

Joined: Thu Apr 08, 2010 10:40 pm

Location: DMZ

Post Thu Jun 10, 2010 3:32 pm

Re: Java (J2SE) vs. C#

C# is pretty much EXACTLY the same. And although it does run on .NET, Mono is the open-source, cross-platform to .net
http://www.mono-project.com/Main_Page

Many Linux/MAC programs run on Mono written in c#, like Banshee, Tomboy. Which both run in Linux.

So use Mano is c# answer to cross-platform. So, these two are exactly the same in Functionality. Packages are different. I believe c# has a package for Raw Sockets, unlike java (java does have jpcap though, but terribly documented I think.)

Good luck.
http://twitter.com/mikesantillana
eLearnSecurity Team Member.
<<

caissyd

User avatar

Hero Member
Hero Member

Posts: 894

Joined: Thu Dec 31, 2009 11:20 am

Location: Ottawa, Canada

Post Thu Jun 10, 2010 6:17 pm

Re: Java (J2SE) vs. C#

Microsoft lost the legal war against Sun about 6 or 7 years ago. They were modifying Java and called it J++ back then.

But they lost the lawsuit, they turn arond and created the .Net framework. Now, you don't see people coding in Visual Basic or in Visual C++ that much. They are now uisng C#.

I know Java extremely well and I have spent about 2 months last years coding in C#. My opinion is that Microsoft made C# as close to Java as possible. I personally learned C# in about 3 hours, so it gives you an idea how similar to java it is...

The real deal is to learn their respective frameworks, but their syntaxe is very similar.

I would go with Java. Your programs will easily run on every platform with using Mono...
OSCP, GPEN, GWAPT, GSEC, CEH, CISSP
(aka H1t.M0nk3y)
<<

zeroflaw

User avatar

Full Member
Full Member

Posts: 208

Joined: Fri Feb 12, 2010 10:41 am

Location: Holland, Den Helder

Post Fri Jun 11, 2010 6:58 am

Re: Java (J2SE) vs. C#

Syntax is mostly the same. Sure there are differences and stuff, but if you can code in java you should be able to code in C# fairly quickly. Like H1t M0nk3y said, you need to learn the different frameworks.
ZF
<<

Ketchup

User avatar

Hero Member
Hero Member

Posts: 1021

Joined: Fri Jul 04, 2008 7:44 pm

Location: Philadelphia, PA

Post Fri Jun 11, 2010 5:05 pm

Re: Java (J2SE) vs. C#

I agree with everyone else.  The Express versions of Visual Studio are free.  I have been using those for most of my development as of late.  I haven't been able to justify the cost of a full VS.NET license. 

C# is almost impossible not to learn quickly.  The .NET framework is laid out very intuitively, I think.  This is very contrary to the Windows API, MFC and other MS frameworks. 
~~~~~~~~~~~~~~
Ketchup
<<

N15M0

User avatar

Newbie
Newbie

Posts: 16

Joined: Wed Jun 09, 2010 1:56 pm

Post Sun Jun 13, 2010 8:49 am

Re: Java (J2SE) vs. C#

Ah, thank you, I did not quite understand the diffrent between the two, and I was curious to how they differ from a technical perspective. Thanks everyone for the input! :)

Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests

.
Powered by phpBB® Forum Software © phpBB Group.
Designed by ST Software