Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 227471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:36:05+00:00 2026-05-11T19:36:05+00:00

Since this question is back to four votes to close, I’m trying again to

  • 0

Since this question is back to four votes to close, I’m trying again to ask a more narrow question that hopefully the community will view more favorably.

Which specific design decisions in Java are documented to be done the way that they are not because that was the preferred design decision, but rather because it was necessary to support backwards compatibility.

The obvious case is Generics, where you cannot detect the type parameter at runtime. (So you can’t do:

 public void addEmptyMember(List<?> someList) {
      if (someList instanceof List<String>) {
            ((List<String>) someList).add("");
      }
 }

What other such examples exist in the language design and standard API?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:36:05+00:00Added an answer on May 11, 2026 at 7:36 pm

    Because this question doesn’t have a single right answer, I’m not sure if it’ll fare any better than your other question.

    Three features I can think of (in addition to generic erasure, which you already mentioned) that made compromises in the name of backward compatibility were the new for loop syntax, varargs, and autoboxing.

    The new for loop syntax probably should have read for (item in List), but that would have required making in into a reserved word. This would caused numerous backwards compatibility problems, not the least of which being the fact that System.in would have to be renamed.

    varargs and autoboxing both added the possibilities of ambiguity. For example, if you pass an array of Objects to a method that accepts Object... does that mean the array should be passed as the vararg array or as an element of the vararg array? This gets even more complicated if there are overloads. Autoboxing has similar ambiguity problems with overloading. The solution to both of these problems was to make it a rule that when resolving method calls they are first resolved with the pre-1.5 rules (ie: no autoboxing, and Object... is treated as Object[]). Only if the method call can’t be resolved with the pre-1.5 rules are the new 1.5 rules considered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 124k
  • Answers 124k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use a SqlDataReader to obtain the value, and… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer You could move the controls from the page into a… May 12, 2026 at 1:19 am
  • Editorial Team
    Editorial Team added an answer I have used the extremely handy app_offline.htm trick to shut… May 12, 2026 at 1:19 am

Related Questions

Since this question is back to four votes to close, I'm trying again to
Let's say you work 100 days on a project. How many days would each
Since I use jQuery 1.3+ all except one timed test is using that. The
I recently upgraded VS 2005 to VS 2008. Unfortunately I have a very basic
UPDATE 2009-05-21 I've been testing the #2 method of using a single network share.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.