DEV Community

Tijana Wekker
Tijana Wekker

Posted on

Expression comparison between C# and Java

Recently I have started my study and am preparing my Java course next to C# for the Unity framework.

Are there any expression comparatives which are aligning somehow basic functions and differences between these two programming languages?

I know it is depending on which libraries but as a student I’m currently trying to write some down, but hoped to find some online suggestions?

Example:

Java: ((Integer)42).toString()
C#: toString.()

Thank you for sharing!

Top comments (3)

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

I don't know Java. I can only tell you that hey are very similar, and probably the biggest difference is the concept of Properties. This is something only C# has.

Collapse
 
techwekk profile image
Tijana Wekker

*42.ToString.()

Collapse
 
webjose profile image
José Pablo Ramírez Vargas • Edited

Actually, 42.ToString() in C#. You can also edit your post to correct directly. This, as many other websites, use something called Markdown for simple rich text. It is very simple and easy to learn, so I recommend you learn it. Cheers!