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

Which is better scala or python?

1 Answers  


How do we implement loops functionally? What is the difference between OOP and FP style loops?

1 Answers  


Explain any five string methods?

1 Answers  


What is the use of 'object' keyword in Scala? How to create Singleton objects in Scala?

1 Answers  


What are higher-order functions in scala?

1 Answers  


What is Extractor in Scala? What is the difference between Constructor and Extractor in Scala? What is the use of Extractor in Scala?

1 Answers  


mention the types of variables in scala? And what is the difference between them?

1 Answers  


What is the difference between Case Object and Object(Normal Object)?

1 Answers  


What is file handling in scala?

1 Answers  


What do you mean by scala map?

1 Answers  


Is scala better than python?

1 Answers  


What are the major differences between Scala’s Auxiliary constructors and Java’s constructors?

1 Answers  


Categories