2011-07-19 44 views
6

Sự khác nhau giữa java 1.5 và java 1.6 là gì? Hoặc các tính năng mới được giới thiệu trong java 1.6 là gì? Tôi đã thử duyệt cho cùng một nhưng không thể tìm thấy một câu trả lời thỏa mãn.Sự khác biệt giữa java 1.5 và java 1.6

+1

Sự khác biệt là 0,1, phải không: D ** EDIT ** (để đáp ứng những người không có cảm giác hài hước): Bạn có thể xem [this] (http://www.oracle.com/technetwork/ java/javase/features-141434.html) hoặc [this] (http://www.oracle.com/technetwork/java/javase/webnotes-136672.html). –

+0

các dups đã bị xóa. Có lẽ nó sẽ là một ý tưởng tốt để mở lại nó hoặc ít nhất là thay đổi nó nhà nước từ một dup? – zmo

+0

Các bản sao đã bị xóa không còn liên quan đến SO (trong đó, vì Java 1.6 không hỗ trợ, có ý nghĩa). Do đó, câu hỏi này nên được giữ kín và bị xóa quá, vì lý do tương tự. –

Trả lời

0

Đây là một nhiệm vụ đơn giản của google, xem this page cho nhiều câu trả lời!

7

này liệt kê tất cả các tính năng mới trong 1.6: http://en.wikipedia.org/wiki/Java_6#Java_SE_6_.28December_11.2C_2006.29


Trong trường hợp liên kết không hoạt động trong thời gian tới đây là một bản sao


 
Java SE 6 (December 11, 2006) 

Codename Mustang. As of this version, Sun replaced the name "J2SE" with Java SE and dropped the ".0" from the version number.[19] Internal numbering for developers remains 1.6.0.[20] This version was developed under JSR 270. 

During the development phase, new builds including enhancements and bug fixes were released approximately weekly. Beta versions were released in February and June 2006, leading up to a final release that occurred on December 11, 2006. 

Major changes included in this version:[21][22] 

    Support for older Win9x versions dropped; unofficially, Java 6 Update 7 was the last release of Java shown to work on these versions of Windows.[citation needed] This is believed[by whom?] to be due to the major changes in Update 10. 
    Scripting Language Support (JSR 223): Generic API for tight integration with scripting languages, and built-in Mozilla JavaScript Rhino integration 
    Dramatic performance improvements for the core platform,[23][24] and Swing. 
    Improved Web Service support through JAX-WS (JSR 224) 
    JDBC 4.0 support (JSR 221). 
    Java Compiler API (JSR 199): an API allowing a Java program to select and invoke a Java Compiler programmatically. 
    Upgrade of JAXB to version 2.0: Including integration of a StAX parser. 
    Support for pluggable annotations (JSR 269)[25] 
    Many GUI improvements, such as integration of SwingWorker in the API, table sorting and filtering, and true Swing double-buffering (eliminating the gray-area effect). 
    JVM improvements include: synchronization and compiler performance optimizations, new algorithms and upgrades to existing garbage collection algorithms, and application start-up performance.[26] 

Java 6 reached the end of its supported life in February 2013, at which time all updates, including security updates, were scheduled to be stopped.[27][28] Oracle released one more update to Java 6 in March 2013, which patched some security vulnerabilities.[29] 
Java 6 updates 

After Java 6 release, Sun, and later Oracle, released several updates which, while not changing any public API, enhanced end-user usability or fixed bugs.[30] 

    Release  Release Date  Highlights 

    Java SE 6 Update 1  2007-05-07  
    Java SE 6 Update 2  2007-07-03  
    Java SE 6 Update 3  2007-10-03  
    Java SE 6 Update 4  2008-01-14  HotSpot VM 10 
    Java SE 6 Update 5  2008-03-05  
    Java SE 6 Update 6  2008-04-16  
    Java SE 6 Update 7[31]   Unofficially, Java SE 6 Update 7 (1.6.0.7) is the last version of Java that was shown to be working on the Win9x family of operating systems[citation needed] 
    Java SE 6 Update 10[32]  2008-10-15  HotSpot VM 11. Major changes for this update include: 

     Java Deployment Toolkit, a set of JavaScript functions to ease the deployment of applets and Java Web Start applications.[33] 
     Java Kernel, a small installer including only the most commonly used JRE classes. Other packages are downloaded when needed. 
     Enhanced updater. 
     Enhanced versioning and pack200 support: server-side support is no longer required.[34] 
     Java Quick Starter, to improve cold start-up time. 
     Improved performance of Java2D graphics primitives on Windows, using Direct3D and hardware acceleration. 
     A new Swing look and feel called Nimbus and based on synth.[35] 
     Next-Generation Java Plug-In: applets now run in a separate process and support many features of Web Start applications.[36] 

    Java SE 6 Update 11[37]  2008-12-03  13 security fixes[38] 
    Java SE 6 Update 12[39]  2008-12-12  No security fixes; 64-bit Java plug-in (for 64-bit web browsers only); Windows Server 2008 support; performance improvements of graphics and JavaFX applications 
    Java SE 6 Update 13[40]  2009-03-24  7 security fixes, JNDI store and retrieve Java objects in LDAP slightly modified, JMX Change (createMBeanunregisterMBean), 4 new root certs added 
    Java SE 6 Update 14[41]  2009-05-28  HotSpot VM 14. This release includes extensive performance updates to the JIT compiler, compressed pointers for 64-bit machines, as well as support for the G1 (Garbage First) low pause garbage collector.[42][43] 

    The -XX:+DoEscapeAnalysis option directs the HotSpot JIT compiler to use escape analysis to determine if local objects can be allocated on the stack instead of the heap.[44] 

    Some developers have noticed an issue introduced in this release which causes debuggers to miss breakpoints seemingly randomly.[45] Sun has a corresponding bug, which is tracking the issue. The workaround applies to the Client and Server VMs.[46] Using the -XX:+UseParallelGC option will prevent the failure. Another workaround is to roll back to update 13, or to upgrade to update 16. 
    Java SE 6 Update 15  2009-08-04  Introduced patch-in-place functionality[47] 
    Java SE 6 Update 16  2009-08-11  Fixed the issue introduced in update 14 which caused debuggers to miss breakpoints[48] 
    Java SE 6 Update 17[49]  2009-11-04  Security fixes; 2 new root certificates 
    Java SE 6 Update 18[50]  2010-01-13  No security fixes; Hotspot VM 16; support for Ubuntu 8.04 LTS Desktop Edition, SLES 11, Windows 7, Red Hat Enterprise Linux 5.3, Firefox 3.6, VisualVM 1.2; updated Java DB; many performance improvements 
    Java SE 6 Update 19[51]  2010-03-30  Security fixes; root certificate changes: seven new, three removed, five replaced with stronger signature algorithms; interim fix for TLS renegotiation attack 
    Java SE 6 Update 20[52]  2010-04-15  Two security fixes 
    Java SE 6 Update 21[53]  2010-07-07  No security fixes; Hotspot VM 17; support for Red Hat Enterprise Linux 5.4 and 5.5, Oracle Enterprise Linux 4.8, 5.4, 5.5; Google Chrome 4 support; support for Customized Loading Progress Indicators; VisualVM 1.2.2 
    Java SE 6 Update 22[54]  2010-10-12  29 security fixes; RFC 5746 support 
    Java SE 6 Update 23[55]  2010-12-08  No security fixes; Hotspot VM 19; better support for right-to-left languages 
    Java SE 6 Update 24[56]  2011-02-15  21 security fixes; updated Java DB 
    Java SE 6 Update 25  2011-03-21  No security fixes; Hotspot VM 20; support for Internet Explorer 9, Firefox 4 and Chrome 10; improved BigDecimal; includes "tiered" compilation in the Server VM that enables it to start quickly as does the Client VM, while achieving better peak performance (this feature is enabled by specifying -server and -XX:+TieredCompilation command options)[57] 
    Java SE 6 Update 26[58]  2011-06-07  17 new security fixes.[59] Last version compatible with Windows Vista SP1. 
    Java SE 6 Update 27[60]  2011-08-16  No security fixes; certification for Firefox 5 
    Java SE 6 Update 29[61]  2011-10-18  20 security fixes, various bug fixes[62] 
    Java SE 6 Update 30[63]  2011-12-12  No security fixes; fix for SSL regression in Update 29; support for Red Hat Enterprise Linux 6 
    Java SE 6 Update 31[64]  2012-02-14  14 security fixes and one bug fix 
    Java SE 6 Update 32[65]  2012-04-26  No security fixes, various bug fixes 
    Java SE 6 Update 33[66]  2012-06-12  14 security fixes, improved VM configuration file loading 
    Java SE 6 Update 34[67]  2012-08-14  No security fixes, various bug fixes 
    Java SE 6 Update 35[68]  2012-08-30  Contains a security-in-depth fix[69] 
    Java SE 6 Update 37[70]  2012-10-16  30 security fixes 
    Java SE 6 Update 38[71]  2012-12-11  Various bug fixes[72] 
    Java SE 6 Update 39[73]  2013-02-01  50 security fixes 
    Java SE 6 Update 41[74]  2013-02-19  5 security fixes 
    Java SE 6 Update 43[75]  2013-03-04  2 security fixes 
    Java SE 6 Update 45[76]  2013-04-16  42 security fixes;[77] other changes;[76] final public update[78] 
    Java SE 6 Update 51[79]  2013-06-18  Not available publicly, only available through the Java SE Support program and in Apple Update for OS X Snow Leopard, Lion & Mountain Lion; up to 40 security fixes[80] 
    Java SE 6 Update 65[81]  2013-10-15  Not available publicly, only available through the Java SE Support program and in Apple Update for OS X Snow Leopard, Lion & Mountain Lion; at least 11 critical security fixes[82]  
    Java SE 6 Update 71[83]  2014-01-14  Not available for public download; 33 fixes[84] 



1

Sự khác biệt chính trong ngôn ngữ là trong Java 6 bạn có thể thêm @Override vào các phương thức thực hiện các giao diện và trong Java 5.0 bạn không thể.

Nếu bạn gặp sự cố khi di chuyển trường hợp có thể là trường hợp cạnh tối nghĩa trong thư viện ở đâu đó. Bạn sẽ không tìm thấy bất kỳ thứ gì có thể gây ra sự cố trong ngôn ngữ.

0

Có một vài tính năng mới, nhưng không nhiều:

  • @Override chú thích về phương pháp xác định bằng một giao diện
  • NavigableSet, NavigableMap, Deque

Đó là những thay đổi mà tôi có thể nghĩ về.

Chờ, có nhiều:

  • Pluggable Processing Chú
  • truy cập Programmatical để trình biên dịch thông qua ToolProvider
0

Những thay đổi có thể nhìn thấy chỉ có trong thư viện. Bạn có thể tìm thấy bản tóm tắt on wikipedia. Bản thân ngôn ngữ không thay đổi. Bên trong, trong JVM và các phần mềm liên quan như Java WebStart, cũng có rất nhiều cải tiến.

0

Ở đây bạn có câu trả lời link.

Các vấn đề liên quan