Java 6 Source backward-compatibility and SQL

My understanding is that in order to maintain source-compatibility, Java never introduces new methods to public interfaces, as that breaks existing clients implementing the interfaces. [Java Release notes]( states > In general, the policy is as follows, > except for any incompatibilities > listed further below: > > - Maintenance releases (such as 1.4.1, > 1.4.2) do not introduce any new language features or APIs. They will > maintain source-compatibility with > each other. > > - Functionality releases and major > releases (such as 1.3.0, 1.4.0, 5.0) > maintain upwards but not downwards > source-compatibility. Yet, the packages `java.sql` and `javax.sql` continue to evolve and introduce many incompatible changes. For example, I noticed the following incompatible changes (introduced in Java 6): - [`java.sql.Statement`]( extends `java.sql.Wrapper`, requiring new two new methods. - [`java.sql.Statement`]( introduces 3 new methods - [`java.sql.PreparedStatement`]( introduces 19 new methods! - [`java.sql.ResultSet`]( introduces 48 new methods! Do you know how and why these methods got added? Is `java.sql` being treated differently from the rest of the platform? Do you know of the discussion/JSR around these additions?
Adding methods does not break upwards compatibility, only downwards (which is allowed for major releases, like Java 6).

以上就是Java 6 Source backward-compatibility and SQL的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » JavaScript 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准