Loading, please wait...

Scala MCQ Quiz (Multiple Choice Questions And Answers)

Search here for MCQs

Are you preparing for the next job interviews? If yes, trust me this post will help you also we'll suggest you check out a big collection for Programming Full Forms that may help you in your interview:

List of Programming Full Forms 

17. Which of the following is not used to create a string in Scala?

  • var greeting = "Hello world!";
  • var greeting:String = "Hello world!";
  • Both A and B
  • None of the above

18. In Scala, ___ method returns the number of characters contained in the string object

  • length()
  • lengths()
  • range()
  • None of the above

19. The __ interpolator is similar to __ interpolator except that it performs no escaping of literals within a string

  • ‘raw’, ‘s’
  •  ‘s’, ‘raw’
  • Both A and B
  • None of the above

20. Which one of the following is not a method defined by java lang String concat(String str)String class?

  • String concat(String str)
  • boolean contentEquals(StringBuffer sb)
  • byte getBytes()
  • All of the above