Title: How to do the Scala's Seq ++ operand in Java
Tags: java;scala
Question: I'm working with Scala's Seq class in Java (scala.collection.Seq<A&gt;) and according to Scala documentation, there a ++ operand that merges two Seq into one. How can I do the same in Java?
Comment: @SarveshKumarSingh No, it doesn't. See my answer.

Comment: does `seq1.++(seq2)` not work?

Here is the accepted answer: Scala identifier ++ is translated into $plus$plus on JVM. Unfortunately, you can't call seq1.$plus$plus(seq2), because the real signature of ++ is
def ++[B &gt;: A, That](that: GenTraversableOnce[B])(implicit bf: CanBuildFrom[Repr, B, That]): That
and supplying the CanBuildFrom argument from Java is... technically possible, but not something you want to do.
So I suggest converting Scala collections to Java using JavaConverters methods before working with them in Java whenever CanBuildFrom gets involved.
Comment for this answer: Thanks, you seem knowledgeable on Java and Scala. Could you please take a look at my other question? https://stackoverflow.com/questions/53037901/how-to-get-the-typetag-for-a-class-in-java

Here is another answer: To do the same in java, you could use the addAll method. Lets say you have two lists listOne and listTwo.
List<T&gt; resultList = new ArrayList<T&gt;(listOne);
resultList.addAll(listTwo);

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 2, 'CommentCount': 2, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:10/29/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<java><scala>', 'Title': "How to do the Scala's Seq ++ operand in Java", 'ViewCount': 124, 'id': 53038913, 'user_AboutMe': "<p>I don't claim that I know everything.\nBut I can learn anything.</p>\n", 'user_AccountId': 463283.0, 'user_DisplayName': 'Mehran', 'user_Reputation': 14761.0, 'user_Views': 1255.0, 'user_id': 866082.0}}