Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
private
:
Content language: English
Русский
Given the case class, what will be the result of calling method inside the object accessing private field of case class? class Person(val name: String, private val superheroName: String) //The superhero name is private! object Person { def showMeInnerSecret(x: Person) = x.superheroName } val clark = new Person("Clark Kent", "Superman") val peter = new Person("Peter Parker", "Spider-Man") Person.showMeInnerSecret(clark) Person.showMeInnerSecret(peter)
private
← Prev
1
Next →
Sign Up Now
or
Subscribe for future quizzes