Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the result of x+y*z and why?



What is the result of x+y*z and why?..

Answer / Deepa Sinha

The result depends on the data types of x, y, and z. If they are integers or floats, the operation will be performed according to the usual rules of arithmetic: first multiplication (y*z), then addition (x+(y*z)). However, if x is a string, the result will be a concatenation of x, y*z as strings. This is because the '+' operator has different meanings for numeric and string types.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Scala Interview Questions

List the advantages of using scala over other functional programming languages.

1 Answers  


What is the default Unit and Functional Testing Framework for Play? What is the default Build Tool for Play? What is the Default Template Engine for Play? What is the built-in Web Server available in Play Framework?

1 Answers  


How is the scala code compiled?

1 Answers  


What is this in scala?

1 Answers  


What is final in scala?

1 Answers  


Is scala good for data science?

1 Answers  


How many operators are there in Scala and Why?

1 Answers  


What do you mean by “type inference” in scala?

1 Answers  


What is the function parameter with a default value in scala?

1 Answers  


What is a monad in scala?

1 Answers  


Why is scala good for big data?

1 Answers  


What is 'Type Inference' in Scala?

1 Answers  


Categories