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 5938333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:40:15+00:00 2026-05-22T15:40:15+00:00

georgii@gleontiev:~$ scala Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24).

  • 0
georgii@gleontiev:~$ scala
Welcome to Scala version 2.8.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_24).
Type in expressions to have them evaluated.
Type :help for more information.

scala> val jbool = java.lang.Boolean.TRUE    
jbool: java.lang.Boolean = true

scala> val sbool = true         
sbool: Boolean = true

scala> def sboolMethod(sbool: Boolean) = print("got scala.Boolean " + sbool)              
sboolMethod: (sbool: Boolean)Unit

scala> sboolMethod(sbool)
got scala.Boolean true

scala> sboolMethod(jbool)
<console>:9: error: type mismatch;
 found   : java.lang.Boolean
 required: scala.Boolean
       sboolMethod(jbool)
                   ^

scala> implicit def jbool2sbool(bool: java.lang.Boolean): scala.Boolean = bool.booleanValue
jbool2sbool: (bool: java.lang.Boolean)Boolean

scala> sboolMethod(jbool)                                                                  
got scala.Boolean true

The question is: why isn’t there a default implicit conversion from java.lang.Boolean to scala.Boolean? The question also stands for java.lang.Long vs scala.Long and probably other standard types (haven’t tried all of them).

  • 1 1 Answer
  • 2 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-22T15:40:15+00:00Added an answer on May 22, 2026 at 3:40 pm

    In 2.9, there is such a conversion, presumably to aid interoperability with Java. (Scala doesn’t need it on its own, because it transparently boxes and unboxes primitives, which is perhaps why it wasn’t included earlier.)

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

Sidebar

Related Questions

window.localStorage.setItem(Georgia,Atlanta) var x=window.localStorage.getItem(Georgia) I have a list of 50 states and the largest city
I have a tableview cell in a view which has some text in it,the
I have table with following structure: <table style= margin-top: 10px; border: 1px wheat solid;
I am a beginner in web programming and have some very simple questions. I'm
I'm a bit confused about the laws applied to web fonts. I know that
I have a flowdocument in WPF that looks like this: <FlowDocument xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Paragraph
I have a HTTPHandler that produces a Captcha image to the user whenever the
I have an ordered list which uses large Georgia for the numbering and smaller
Browsing through the 2.0-wip branch of Twitter Bootstrap, I found LESS have a nice
This is a question regarding a very simple construction - I have the following

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.