Ask Question
24 August, 23:56

Consider the following code: / / Merge mailing list m2 into m1 void merge (MailingList m1, MailingList m2) { for (int i = 0; i < m2. numEntries (); + +i) m1. add (m2. getEntry (i)); } The programmers who first encountered this code fragment weren't sure if it was in C+ + or Java. In fact, with the addition of some appropriate declarations, it would probably compile correctly in either language. Which language is it? Explain your answer.

+5
Answers (1)
  1. 25 August, 00:11
    0
    That is a Java language

    Explanation:

    This is simply Because C+ + language does not support the calling of the methods without parameters and with the. (dot) operator.

    It can also be clearly noted that This is the functionality of Java, for example, to sort we call Array. Sort ().

    So the parameter here is passed by placing the variable at front with the. (dot).
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Consider the following code: / / Merge mailing list m2 into m1 void merge (MailingList m1, MailingList m2) { for (int i = 0; i < m2. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers