Difference Between C sharp And Java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • priya.sharma
    Senior Member
    • Aug 2016
    • 105

    Difference Between C sharp And Java

    1) C Sharp allows switch statements to operate on strings and Java allows only Integers and character.

    2) C Sharp includes more primitive types and the functionality to catch arithmetic exceptions than java.

    3) Java supports checked exceptions for better enforcement of error trapping and handling then C Sharp
  • Guest

    #2
    While C# and Java are similar in many ways, they also have some differences. If they didn't, there would have been no reason to develop C# at all, since Java has been around longer.

    Comment

    • Guest

      #3
      C Sharp and java are similar languages in some aspects. C Sharp supports string in switch statement and java supports only integer and char

      Comment

      • Swati walia
        Senior Member
        • Sep 2016
        • 108

        #4
        Java requires that a source file name must match the only public cl*** inside it while C# allows multiple public cl***es in the same file.

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎