Salesforce Developer Interview Question and answers part 8

 Next>>> Part 9[Questions 49-54]

43. What is the significance of ID data type in salesforce?
Ans - Every record in salesforce is represented using a parameter called as id. Salesforce uses Data type ID for storing such record id's. An ID is represented in terms of 15 digit or 18 digit. 15 digit id is case sensitive where as 18 digit id is case insensitive. First 3 characters of ID indiacte the object for example 001 means its an account record or 006 means its an opportunity record.

44. What is the difference between a List and Set?
Ans - A List and Set are both collections similar to array with following differences
 List can store duplicate values in it, set can store only unique values
List can store primitive types,sObject as well as collections in it,Set can store primitive and sObjects but not collection
List is Ordered where as set is unordered.

45. What are the various primitive data types available in salesforce?
Ans - Various primitive data types in apex include following
  Decimal, double, integer, Long, String, Id, date. datetime, time, currency, boolean

46. What is a map collection? and how is it different from list and set?
Ans - A map consists of key and values. Keys are unique while values can be duplicated. Every key points to a value. Using methods we can retrieve the values using the keys or store key-values mappings. map is useful in storing relationships between to parameters. Key is similar to set which can only store primitive types where as values are like set that can also store collections in it. There are number of methods that can be used to manipulate data in map.

47. What is an sObject data type?
Ans - sObject is a data type that can store standard or custom object in it. Account for example is a sObject type of data.
ex-   sObject sO = new account()

48. What is a sandbox.? what are the different types available?
Ans - sandbox is a test environment used for developing or testing the functionality. It is an exact copy of your production org. Sandbox can be full sandbox, Developer sandbox, Developer Pro, Partial Data sandbox

 Next>>> Part 9[Questions 49-54]

No comments:

Post a Comment