Results 1 to 6 of 6

Thread: Differentiation between java and C sharp

  1. #1
    Join Date
    Dec 2009
    Posts
    38

    Differentiation between java and C sharp

    Hello Friends,

    I have one question regarding two most popular programming languages i.e java and C sharp. According to my information both these programming languages are fully object oriented. And everything inside the program is embedded into the class. Other than this I don't know what are the main difference in between Java and C sharp. Do you know any difference between them? Is yes then let me know that.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Differentiation between java and C sharp

    Hi,

    Java language is designed run on JRE i.e Java Runtime Environment while the C sharp programming language is designed to run on "Common Language Runtime". The "Java Runtime Environment" comprises the JVM Java Virtual Machine along with common set of libraries. Both java and C sharp use garbage collection for reclaiming memory resources. In both language all instances to the classes are of type "by reference"

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: Differentiation between java and C sharp

    Study following two example of java and C sharp. From these two example you can find out the some differences between the declaration syntax of java and C sharp:

    C sharp Example:
    using System;
    // call "System namespace"
    class HelloDemo // declaration of class
    {
    public static void Main () // Declaration of "main method"
    {
    console.writeLine("Welcome to C#");
    }
    }
    Java Example:
    class HelloDemo // declaration of class
    {
    public static void main(String args[]) { // Declaration of "main method"
    System.out.println("Welcome to java");
    }
    }

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Differentiation between java and C sharp

    1. Inheritance:
      Both programming languages doesn't have doesn't for multiple inheritance. But these languages have interfaces as a alternative multiple inheritance.
    2. Main Method:
      In java it is valid to compile a program which doesn't have a main method. But in C sharp it is not valid to compile a program which doesn't have a main method.
    3. Multithreading:
      The Multithreading application of the c sharp programming language is quit simplified than java programming language.

  5. #5
    Join Date
    May 2008
    Posts
    2,297

    Re: Differentiation between java and C sharp

    Hello friend,

    Three are few concepts which are entirely different in java and c sharp language. C sharp programming has support to Fixed-length strings while the java doesn't support it. The "Unsigned integer type" is supported in c sharp but it no supported in java programming. Java doesn't support "Object pinning" concept while the C sharp language has support to "Object pinning". Java support "Soft references" concept , while C sharp doesn't support.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Differentiation between java and C sharp

    Following are some difference between java and C sharp:
    • "type parameter static members" is not available in java but it is available in C#.
    • "contra-variance" is available in C sharp but it's not available in Java programming.
    • "Soft references" is not available in C sharp but it's available in Java programming.

Similar Threads

  1. Sharp 007SH Hybrid An 3D Clamshell Android Phone by Sharp
    By jackalz in forum Web News & Trends
    Replies: 3
    Last Post: 22-05-2011, 07:28 AM
  2. Differentiation between JavaScript and java
    By Gadin in forum Software Development
    Replies: 5
    Last Post: 10-03-2010, 08:25 PM
  3. Differentiation between XML and PHP
    By Gokul20 in forum Software Development
    Replies: 5
    Last Post: 10-03-2010, 03:43 PM
  4. Differentiation between XML and Html
    By Sarfaraj Khan in forum Software Development
    Replies: 5
    Last Post: 12-02-2010, 12:27 PM
  5. Differentiation between WAN and LAN
    By Dolsy_bendal in forum Networking & Security
    Replies: 4
    Last Post: 30-11-2009, 10:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,257,782.01309 seconds with 16 queries