Hi Guest

MobileUser

1 HomePage 1 Jobs 1 WalkIn 1Articles  

Cat Exam

 :) Latest Topic
VB.NET
Perl
COBOL
Pascal
FORTRAN
BASIC
Ada
C++
Scala
ASP.NET
 C
 :) Hot Jobs
 
 :) Latest Articles


  

 
CreamKids


What would be the output of the following code snippet in Scala?
Question Posted on 26 Oct 2022

Home >> Programming Languages >> Scala Constructs >> What would be the output of the following code snippet in Scala?




What would be the output of the following code snippet in Scala?
val l = List(1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 5, 5, 8)
println(l.drop(10))
Choose the correct options from below list
(1)List(8, 5, 5, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1)
(2)List(3, 5, 5, 8)
(3)List(3, 3, 2, 2, 2, 2, 1, 1, 1, 1)
(4)None of the options

Answer:-(2)List(3, 5, 5, 8)
0
0



 
 Input Your Comments Or suggestions(If Any)
 Name
 Email(optional)
 Comments


Other Important Questions
Scala can be run only on JVM.
Which of the following build tools can be used to build Scala projects?
Object keyword is used to define a singleton class in Scala.
AnyVal is the best primitive data type.
Is this a valid expression?






 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |