java到底好在哪里?(100分)

tukey 2002-05-11 10:11:41
我研究vc的时间并不长,觉得vc、vb、bcb等工具是实实在在的软件开发工具。我看了不少关于java的文章和介绍,都说它有这样那样的优点,尤其是在安全性方面等等,可是我现在所见过的java程序无非就是web上的一些applet,却从未见过一个真正象用vc、vb或delphi等做的软件,而那些applet,我认为就算没有java也可以用cgi、php或asp做,而且很可能会更简捷。我想知道java到底好在哪里,有没有发展前途,这里想和高手们研究一下这个问题,请大家赐教!
...全文
36 47 打赏 收藏 转发到动态 举报
写回复
用AI写文章
47 条回复
切换为时间正序
请发表友善的回复…
发表回复
Rosycloudlet 2002-07-20
  • 打赏
  • 举报
回复
你可知否?
手机等设备大都用JAVA编写:)
mygarfield 2002-06-07
  • 打赏
  • 举报
回复
JAVA体贴又周到,有独有的竖式凹道,防止侧漏,用了都说好!!!
:)
cloudwindbase 2002-05-27
  • 打赏
  • 举报
回复
好就是好。
你用用就知道了,真的,以前我也是学C++(现在也在学),现在用JAVA,觉得它别有一种风味,呵呵。
justadog 2002-05-27
  • 打赏
  • 举报
回复
java 与c#呢?好像java有的c#都有。
uf65 2002-05-27
  • 打赏
  • 举报
回复
Hi:
As the title said, the following is a piece of handout from one of Stanford U. Computer Science course
*************************************************************
CS193i, Stanford University Handout #30
Spring, 2000-01 Nick Parlante

Java Introduction
This is the outline for the Java section going over all the language basics in one session.

Java Qualities
Compiled to bytecode
Interpreted at runtime -- potentially slow
Interpreters are slower than compiled code, but they enable true portability
Modern systems are not true interpreters -- they use some form of Just-in-time- Compile to build native code at runtime. Sun's "hot spot" system does this in a sophisticated way at runtime.

Realistically, not as fast as C, but getting closer.

Java's dynamic features: safe pointers, garbage collection, etc. extract a penalty vs. C code.

Portable

Runs the same everywhere without even a re-compile. Very true for the core language. Less true for first GUI library, AWT, but the new GUI library Swing has fixed this.

Robust/Safe
Hard to crash, hard to write viruses


Structured -- typed
Java has a formal type system that must be obeyed at compile-time and run-time. This is helpful for larger projects, where the structure helps keep the various parts consistent. Contrast to Perl, which as more of a quick-n-dirty feel.

C/C++ Syntax
Fool the C/C++ programmers into thinking this is not much of a change

OOP
The best way to structure code


Official "Blessed" libraries for common problems
Common classes: String, Collection, Date ...
GUI libs (AWT, Swing)

Threaded
Supports multiple threads of control built in to the language

Dynamic
Types/behaviors are determined at run-time (most flexible, at the cost of some efficiency).

Automatic garbage collector takes care of memory management.

*************************************************************************
Point: Somewhat slow + portable + programmer efficiency features
**************************************************************************
Programmer Efficiency
Faster Development
Building an application in Java takes about 30% less time than in C or C++

Libraries
Code re-use at last -- String, ArrayList, ... (C++ can also do this to an extent)

Memory errors
Memory errors largely disappear because of the safe pointers and garbage collector. I suspect the lack of memory errors accounts for much of the increased programmer productivity.

Java Niche
CPU time vs. Programmer time tradeoff

Portability
Send code from one place to another Avoid vendor lock-in
Microsoft hates this feature (in any domain, it's natural for the largest vendor to dislike portability, while the small vendors and the customers like portability).

Applets
Java code, runs in the browser in a "sandbox" Did not work that well
Not well implemented the first time -- AWT not well done, in-the-browser
concept is fragile
Microsoft not helping
Custom server side applications

A good match for Java qualities -- robust/safe, programmer efficient, portable (e.g. develop on NT, deploy on Solaris, Linux, ...)
xyhv 2002-05-27
  • 打赏
  • 举报
回复
JAVA主要的优点在于网络安全
stYy2002 2002-05-26
  • 打赏
  • 举报
回复
Java主要用在服务器方面。JAVA要是离开网络,它的应用并不是很多。JAVA的OO是最好的!!C++完全不能与之比较!!

我热爱JAVA,请大家可以讨论讨论..

lcjly@sina.com.cn
joyfire 2002-05-25
  • 打赏
  • 举报
回复
applet和jsp不是java application!!!
asiashaw 2002-05-25
  • 打赏
  • 举报
回复
用Java开发的应用程序巨慢。 这是他最大的缺点。

但只要你对速度的要求不是那么的苛刻, 也就是说可以容忍 Java 的速度的话, 相比而言, 他会大大减少开发的难度, 可以获得 C++ 1-1.5 倍的效率。

在我们公司的 40 人做了16个月的一个系统中(Java应用程序, 现在还没有做完), 选用Java 当然有许多的考虑, 例如 跨平台, 安全性, 但最大的原因则如上所述。

撑握java并不是排斥其他语言,现在是java的时代,所以我们学习java,但技术一下在发展,没有一门语言可以一直统冶开发,终有一天java也会被取代,所以在学习java的同时,我建议了解一下新出现的语言如:delphi的替代语言,及c#等,不要等时代抛弃你再去学。
只要你不用JNI(Java Native Interface),你写的Java程序理论上来讲可以原封不动在许多平台上执行,而且相对而言,Java是门比C++比较乾净的OO语言,前途应该是很光明


WCYLY 2002-05-23
  • 打赏
  • 举报
回复
以下是代碼連接:

try
{Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
String sourceURL=new String("jdbc:odbc:test");//test時資料來源
DBConn=DriverManager.getConnection(sourceURL);
statement=DBConn.createStatement();
statement.executQuery("select * from .....);
}
catch(ClassNotFoundException e)
{System.out.println(e);}
catch(SQLException e)
{System.out.println(e);}
}

在Jbuilder中可以直接用控件連接,代碼不用寫自己給出,
具體去看看Jbuilder中Help->Dataexpress Refrence中有例子,還有圖,非常清楚,自己看吧
javaxbenz 2002-05-23
  • 打赏
  • 举报
回复
神奇的JAVA
weblive 2002-05-23
  • 打赏
  • 举报
回复
我觉得用java写程序好就好在不要用到指针!指针这东西,我敢说还没有人100%的了解并能运用它!很多问题恰恰就出在指针上!!

还有,以后的世界属于网络,而java正是为了这种目的而创造的!
各有各的好!!!
jspxnet 2002-05-22
  • 打赏
  • 举报
回复
是好东西,也是坏东西.
反正用java感觉,很累人.
但有时候,还是想用.
shining_ljr 2002-05-22
  • 打赏
  • 举报
回复
请大家以后不要再回答这些没意义的问题,因为以前问的太多了,请某些人以后也不要再问这种无聊的问题。整个JAVA论坛被人说平均水平低下,这累帖子的存在也是一个重要原因。要贴请贴些技术性的文章,要问请问些技术性的问题!我提议Java论坛的各位朋友,以后遇到此类帖子,我们一律不予回复!!
solarlee 2002-05-19
  • 打赏
  • 举报
回复
同意楼上!
不仅要专,而且要博。所有软件都是相通的,可以从别的语言那里借鉴许多有用的东西。我相信这2方面互相促进。
一人前端 2002-05-19
  • 打赏
  • 举报
回复
JAVA之所以吸引人就在于他极强的跨平台和代码的无限重用性!还有好多很有意思的!
dreammaster 2002-05-19
  • 打赏
  • 举报
回复
撑握java并不是排斥其他语言,现在是java的时代,所以我们学习java,但技术一下在发展,没有一门语言可以一直统冶开发,终有一天java也会被取代,所以在学习java的同时,我建议了解一下新出现的语言如:delphi的替代语言,及c#等,不要等时代抛弃你再去学。
lmszcm 2002-05-19
  • 打赏
  • 举报
回复
四层楼上的,JAVA才是真正的 00,不是精简的OO,C++不是纯粹的OO,只是过度的,明天属于JAVA!!!
ewang_365 2002-05-19
  • 打赏
  • 举报
回复
好就一个字
我只说一次


BEST JAVA!!!!!!!!!!!!!!!!!!!!!!
wangweitao 2002-05-19
  • 打赏
  • 举报
回复
知已知彼,方能百战百胜,只要自己认准了学习java语言,就不要有什么后怕的,反正计算机语言这个东东是学得越多越好,你们说是不是,再说,java语言也并不是像前面几位所说的那么差,只不过有些东东有待进一步的修改罢了,不知道我说的对不对,还请各位大虾们多多指教,谢谢!
加载更多回复(27)

62,612

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧