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

  • Home
  • SEARCH
  • 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 6850533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:08:10+00:00 2026-05-27T01:08:10+00:00

I must have missed something obvious, but how do you create a scala-tuple in

  • 0

I must have missed something obvious, but how do
you create a scala-tuple in Java.

I have a scala interface that is implemented in java (for now)
and includes the return of a tuple, but how do I implement it?

  • 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-27T01:08:10+00:00Added an answer on May 27, 2026 at 1:08 am

    Use the class scala.Tuple1, scala.Tuple2, …, scala.Tuple22.

    http://codemonkeyism.com/tuples-scala-goodness/ explains it well:

    What are tuples? Tuples are containers for values. In Scala you create a Tuple with:

    scala> val t = (1,2)
    t: (Int, Int) = (1,2)
    

    which is syntactic sugar for

    scala> val t = new Tuple2(1,2)
    t: (Int, Int) = (1,2)
    

    as Tuples are plain classes in the Scala library. Tuples are of type Tuple1, Tuple2, Tuple3 and so on.

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

Sidebar

Related Questions

I must have missed something regarding generics in Java, but why does this not
I must have missed something here. I am trying to create a table but
I must have overlooked something completely obvious?? but my button displays its image and
I must have missed something in my LINQ training. In Linq to SQL using
In Java I have code that works well on OSX but not in linux.
I'm thinking maybe I missed something in JavaScript that I'm just picking up now.
Here's another one of these LinqToSQL questions where I'm sure I must have missed
I must have pressed on the wrong button at some point, and now when
I must have done something wrong. I have a C# project in Visual Studio
I'm sure this must have been asked before, but I can't find it. Can

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.