Geeks Talk

Prepare for your Next Interview




How C# differes from JAVA

This is a discussion on How C# differes from JAVA within the C# forums, part of the Software Development category; How C# differes from JAVA? Plz give technical differences....


Go Back   Geeks Talk > Software Development > C#

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-20-2007
Junior Member
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
imvinaykumar is on a distinguished road
Question How C# differes from JAVA

How C# differes from JAVA? Plz give technical differences.
Reply With Quote
The Following User Says Thank You to imvinaykumar For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 06-25-2007
Contributing Member
 
Join Date: May 2007
Location: bangalore
Posts: 65
Thanks: 3
Thanked 8 Times in 6 Posts
hari.nattuva is on a distinguished road
Re: How C# differes from JAVA

1. java is a platform independent when it comes to .net it is not completly platform independent.
2. java doesn't supports pointers where as c# we can.
3. java doesn't supports operator overloading where as c# we can.
Reply With Quote
The Following User Says Thank You to hari.nattuva For This Useful Post:
  #3 (permalink)  
Old 01-14-2008
Junior Member
 
Join Date: Sep 2007
Location: Delhi
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
deepakk87 is on a distinguished road
Re: How C# differes from JAVA

Dot can use poinrter but we have to compile it with unsafe keyword in java we can not use system dll file like kernel.dll gdi.dll etc while in dot.net we can do all this .example we can use directx in .net and create commercial games but thats not possible with java although we can use opengl in java as open gl is also platform independent and is found in all type of system. Although .net is built on the same model of java but it allows us to all the thing which we done in c/c++ and use feature specific to windows only . .net is more easier to learn and work than java(i worked on both); .net is more productive than java(means we can achieve more in lesser coding)
Reply With Quote
  #4 (permalink)  
Old 04-30-2008
Junior Member
 
Join Date: Apr 2008
Location: visakhaptnam
Posts: 18
Thanks: 2
Thanked 2 Times in 1 Post
ushalakshmi is on a distinguished road
Re: How C# differes from JAVA

Java is influeced by C++ whereas C# is enhaced version of C++.
C# derives from C/C++ with modernization and type safety- to adapt the changes in environment and to implement advances in the art of programming.
In Java the return type ofmain() is void.
whereas in C#, We are not restricted only to void we can also also have int.
In Java pointers does not exist and was not designed to be compatible with any other languge. Although the default for C# code is safe mode , we can declare classes or method to be unsage This enable us to use pointers , structs andstatically allocated arrays.Both the safe mode and unsafe code run in the managed space , which implies no marshalling is incurred when calling unsafe code from safe code.
In Java the main(), if there are no parameters required we still need to incle the command line parameters array. This is not the case with C# we can declare Main() as
public static void Main(){...}
Although Java supports constructors, it doesn't have destructors. Whereas in C# we have destructors to release all the expensive resources even though we have garbage collector, which does the same - isn't invoked immediately after the variable goes out of scope, but only at certain intervals or memory conditions.

In Java it is not possible to declare unsigned integers whereas in C# POS type system i.e., intended to support the complete implementation of a wide range of programming language makes us impossible to declare unsigned integers.
Reply With Quote
  #5 (permalink)  
Old 07-23-2008
Junior Member
 
Join Date: Jul 2008
Location: Bangalore
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Sangita_agg is on a distinguished road
Re: How C# differes from JAVA

1.By default in dot net 3 thread is started ie App thread,Worker Thread and finalizer thread but in java only one thread is started.
2.In jave no concept of App_Domain bit in dot net it has.
3.In java platform indepency in case of O/s,But in dot net platform independency is for processor.
4.in Java 4 generation og GC but in dot net 3 generation
Reply With Quote
  #6 (permalink)  
Old 07-24-2008
Junior Member
 
Join Date: Jan 2008
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
venu5805 is on a distinguished road
Re: How C# differes from JAVA

in addition to above comments,c# is comemrcial prodcut where as java is opensource,
thats why many people had put their hands and made it so popular,
soem of them are
Appache(ant,maven,tomcat,jboss,the most popular framework struts).
IBM(Eclipse,websphere)
orcale (some open apis)
Reply With Quote
  #7 (permalink)  
Old 08-11-2008
Junior Member
 
Join Date: Jun 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
usguru is on a distinguished road
Re: How C# differes from JAVA

in java u can create whatever u wants

but .net tech u depends on micro soft controls
Reply With Quote
  #8 (permalink)  
Old 08-29-2008
Junior Member
 
Join Date: Aug 2008
Location: Bangalore
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
m_ahmed144 is on a distinguished road
Re: How C# differes from JAVA

in Java both compilation and interpretation is there,i.e. source code is compiled to java byte code which is again interpretated by the java interpreter but in .NET ,all codes are compiled no interpretation is there,i.e.-
source code is compiled to MSIL and then again MSIL is converted to machine code using JIT compiler

Last edited by m_ahmed144 : 08-29-2008 at 08:02 AM. Reason: Incomplete
Reply With Quote
Reply

  Geeks Talk > Software Development > C#


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Why JAVA is NOT sudeep.goel Java 11 3 Weeks Ago 12:19 PM
How to test java project in QTP without java addin Geek_Guest QTP 7 09-18-2007 07:53 AM
is java is a.. samineni6 Java 5 06-07-2007 02:45 AM
Java rajesh.tripathi Java 2 04-26-2007 07:35 AM
Java over C++ Manojks OOPS 3 02-20-2007 11:11 PM


All times are GMT -4. The time now is 01:56 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved