我应该学习 C# 还是 Java?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6557114/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-30 16:20:57  来源:igfitidea点击:

Should I Learn C# or Java?

c#javadatabaseuser-interfaceprogramming-languages

提问by killerCoder

I am a second year Computer Engineering student and I need to study in-depth GUI with database programming.

我是计算机工程专业的二年级学生,我需要通过数据库编程深入学习 GUI。

I am not completely new to it as I have made some mini-projects in C#...and Java... But now need to master the subject.

我对它并不完全陌生,因为我已经用 C# 和 Java 做了一些小项目……但现在需要掌握这个主题。

My Question is in which language is well equipped and demanding(market prospective) Java or C#?

我的问题是哪种语言装备精良且要求(市场前景)Java 或 C#?

Obviously I cannot do both of them and I know that most of the coding in Java and C# are the same.... but as far as GUI and Database programming is concerned there are some differences... Also some reference Text books will be of great help :-))

显然我不能同时做这两个,我知道 Java 和 C# 中的大多数编码是相同的....但就 GUI 和数据库编程而言,存在一些差异...还有一些参考教科书有很大帮助:-))

采纳答案by Pieter Müller

It depends on your target systems... I would say it is generally faster to develop in C# in Visual Studio than in Java. Also C# ties into Microsoft SQL Server very nicely. C# and .NET 4.0 offers you Windows Presentation Foundation (WPF) for building GUI's, which I find to be superior to Windows Forms or Java GUI's, although I haven't worked with Java in a couple of years and last time I built a Java GUI it was with Swing.

这取决于你的目标系统......我会说在 Visual Studio 中用 C# 开发通常比在 Java 中开发要快。此外,C# 与 Microsoft SQL Server 的关系非常好。C# 和 .NET 4.0 为您提供了用于构建 GUI 的 Windows Presentation Foundation (WPF),我发现它优于 Windows Forms 或 Java GUI,尽管我已经有几年没有使用 Java 了,上次我构建了一个 Java GUI 它是与 Swing 的。

There is a lot of support from Microsoft for C# and MS SQL Server, and you can do most things for free (as with Java). If you are targeting Windows systems, I would go with C#.

Microsoft 为 C# 和 MS SQL Server 提供了很多支持,并且您可以免费完成大多数事情(与 Java 一样)。如果您的目标是 Windows 系统,我会选择 C#。

EDIT:Also, LINQ-to-SQL is awesome, very intuitive way to access the database and get objects to work with. So another plus to C# from me.

编辑:此外,LINQ-to-SQL 是一种很棒的、非常直观的访问数据库和获取对象的方式。所以我对 C# 的另一个加分。

回答by Tim

By "demanding" I think you mean to say "in demand".

通过“要求”,我认为您的意思是说“有需求”。

Best thing to do is to look at the classified ads, see which kinds of companies are asking for java and which kinds are asking for C#, and then decide which of the two to emphasize based on your career goals and personal preferences.

最好的办法是看分类广告,看看哪些公司要求Java,哪些公司要求C#,然后根据您的职业目标和个人喜好决定强调两者中的哪一个。