{"id":226,"date":"2022-04-01T05:00:00","date_gmt":"2022-04-01T05:00:00","guid":{"rendered":""},"modified":"2023-07-02T23:03:24","modified_gmt":"2023-07-02T17:33:24","slug":"what-is-apex-programming-language","status":"publish","type":"post","link":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/","title":{"rendered":"What is Apex programming language"},"content":{"rendered":"<p><b><u><span style=\"font-size: large;\">Apex programming language<\/span><\/u><\/b><\/p>\n<ul style=\"text-align: left;\">\n<li>Apex is a programming language that uses Java-like syntax and acts like database stored procedures. Apex enables developers to add business logic to system events, such as button clicks, updates of related records, and Visualforce pages.<\/li>\n<li>Apex is strongly typed object-oriented, on-demand programming language. It is compiled, stored, and run entirely on the Force.com platform (multi-tenant environment and is very controlled in its invocations and limits).<\/li>\n<li>Apex syntax looks mostly like Java and acts like stored procedures.<\/li>\n<li>Apex allows developers to attach business logic to the record save process<\/li>\n<li>Apex has built-in support for unit test creation and execution.<\/li>\n<\/ul>\n<p><span style=\"font-size: medium;\"><b>Apex provided build in support for:<\/b><\/span><\/p>\n<ul style=\"text-align: left;\">\n<li>DML calls to insert, update, and delete a record.<\/li>\n<li>Inline SOQL or SOSL statements for retrieving records.<\/li>\n<li>Looping control structures that help with bulk processing.<\/li>\n<li>A record locking syntax that prevents record update conflicts.<\/li>\n<li>Custom public API calls.<\/li>\n<li>Send and receive emails.<\/li>\n<li>Web services or XML request\/response integrations.<\/li>\n<li>Warnings and errors to prevent objects referenced by Apex from being modified.<\/li>\n<\/ul>\n<p><b><span style=\"font-size: medium;\">What is the apex class and Triggers?<\/span><\/b><\/p>\n<ul style=\"text-align: left;\">\n<li><b>Apex Classes<\/b>:<br \/>\nIt is a collection of variables and a library of methods that can be reused.<\/li>\n<li><b>Apex Trigger<\/b>:<br \/>\nIt is a script that executes before or after a specific data manipulation language (DML) event on a particular Salesforce object.<\/li>\n<\/ul>\n<p><span style=\"font-size: medium;\"><b>Apex Data Types:<\/b><\/span><\/p>\n<ul style=\"text-align: left;\">\n<li>Primitive data types (Integer, Boolean, String)<\/li>\n<li>Enum (an enumerated list)<\/li>\n<li>sObjects (sObject, or Account, contact, object__c)<\/li>\n<li>Collection (list, set, map)<\/li>\n<li>Null (for the null constant. Which can be assigned to any variable.<\/li>\n<li>An object created by the user \u2013 or system-defined classes.<\/li>\n<\/ul>\n<p><span style=\"font-size: medium;\"><b>Apex Primitive Type Keyword:<\/b><\/span><\/p>\n<p>1. String:<br \/>\nRepresents Set of characters surrounded by single quotes.<\/p>\n<p>2. Boolean:<br \/>\nThis variable can either be true, false or null. Many times, this type of variable can be used as flag in programming to identify if the particular condition is set or not set.<\/p>\n<p>3. Integer:<br \/>\nA 32-bit number that does not include a decimal point. Integers have a minimum value of -2,147,483,648 and a maximum value of 2,147,483,647.<\/p>\n<p>4. Decimal:<br \/>\nThis data type represents Number that includes a decimal point. Decimal is an arbitrary precision number.<\/p>\n<p>5. Datetime:<br \/>\nA value that indicates a particular day and time, such as a timestamp. Always create datetime values with a system static method. You can add or subtract an Integer or Double value from a Datetime value, returning a Date value. Addition and subtraction of Integer and Double values are the only arithmetic functions that work with Datetime values. Use\u00a0<a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.236.0.apexref.meta\/apexref\/apex_methods_system_datetime.htm\" target=\"_blank\" rel=\"nofollow noopener\">Datetime Method<\/a><\/p>\n<p>6. Double:<br \/>\nA 64-bit number that includes a decimal point.<\/p>\n<p>7. ID:<br \/>\nRepresents 18-character Force.com record identifier.<\/p>\n<p>8. Date:<br \/>\nA value that indicates a particular day. Unlike Datetime values, Date values contain no information about time. Always create date values with a system static method.<\/p>\n<p>9. Long:<br \/>\nRepresents 64-bit number that doesn\u2019t include a decimal point. minimum value of -263 maximum value of 263-1.<\/p>\n<p>10. Blob:<br \/>\nA collection of binary data stored as a single object. You can convert this data type to String or from String using the toString and valueOf methods, respectively.<\/p>\n<p>11. Time:<br \/>\nRepresents particular time.<\/p>\n<p>12. Object:<br \/>\nAny data type that is supported in Apex. Apex supports primitive data types (such as Integer), user-defined custom classes, the sObject generic type, or an sObject specific type (such as Account). All Apex data types inherit from Object.<\/p>\n<p><b>Resources:<\/b><\/p>\n<p><a href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/langCon_apex_primitives.htm\" target=\"_blank\" rel=\"nofollow noopener\">Apex Data Types<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apex programming language Apex is a programming language that uses Java-like syntax and acts like database stored procedures. Apex enables developers to add business logic to system events, such as button clicks, updates of related records, and Visualforce pages. Apex is strongly typed object-oriented, on-demand programming language. It is compiled, stored, and run entirely on&#8230;<\/p>\n","protected":false},"author":2,"featured_media":114,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-226","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apex"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is Apex programming language - Swapnil SFDC | Salesforce Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Apex programming language - Swapnil SFDC | Salesforce Blog\" \/>\n<meta property=\"og:description\" content=\"Apex programming language Apex is a programming language that uses Java-like syntax and acts like database stored procedures. Apex enables developers to add business logic to system events, such as button clicks, updates of related records, and Visualforce pages. Apex is strongly typed object-oriented, on-demand programming language. It is compiled, stored, and run entirely on...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/\" \/>\n<meta property=\"og:site_name\" content=\"Swapnil SFDC | Salesforce Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-04-01T05:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-02T17:33:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"341\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Swapnil\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SwapnilZambare7\" \/>\n<meta name=\"twitter:site\" content=\"@SwapnilZambare7\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Swapnil\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/\",\"url\":\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/\",\"name\":\"What is Apex programming language - Swapnil SFDC | Salesforce Blog\",\"isPartOf\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png\",\"datePublished\":\"2022-04-01T05:00:00+00:00\",\"dateModified\":\"2023-07-02T17:33:24+00:00\",\"author\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45\"},\"breadcrumb\":{\"@id\":\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#primaryimage\",\"url\":\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png\",\"contentUrl\":\"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png\",\"width\":1024,\"height\":341},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/swapnilzambare.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"What is Apex programming language\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#website\",\"url\":\"https:\/\/swapnilzambare.com\/blog\/\",\"name\":\"Swapnil SFDC | Salesforce Blog\",\"description\":\"Hey trailblazers, Welcome to Swapnil SFDC world.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45\",\"name\":\"Swapnil\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g\",\"caption\":\"Swapnil\"},\"url\":\"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is Apex programming language - Swapnil SFDC | Salesforce Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/","og_locale":"en_US","og_type":"article","og_title":"What is Apex programming language - Swapnil SFDC | Salesforce Blog","og_description":"Apex programming language Apex is a programming language that uses Java-like syntax and acts like database stored procedures. Apex enables developers to add business logic to system events, such as button clicks, updates of related records, and Visualforce pages. Apex is strongly typed object-oriented, on-demand programming language. It is compiled, stored, and run entirely on...","og_url":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/","og_site_name":"Swapnil SFDC | Salesforce Blog","article_published_time":"2022-04-01T05:00:00+00:00","article_modified_time":"2023-07-02T17:33:24+00:00","og_image":[{"width":1024,"height":341,"url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png","type":"image\/png"}],"author":"Swapnil","twitter_card":"summary_large_image","twitter_creator":"@SwapnilZambare7","twitter_site":"@SwapnilZambare7","twitter_misc":{"Written by":"Swapnil","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/","url":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/","name":"What is Apex programming language - Swapnil SFDC | Salesforce Blog","isPartOf":{"@id":"https:\/\/swapnilzambare.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#primaryimage"},"image":{"@id":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#primaryimage"},"thumbnailUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png","datePublished":"2022-04-01T05:00:00+00:00","dateModified":"2023-07-02T17:33:24+00:00","author":{"@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45"},"breadcrumb":{"@id":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#primaryimage","url":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png","contentUrl":"https:\/\/swapnilzambare.com\/blog\/wp-content\/uploads\/2022\/04\/Apex.png","width":1024,"height":341},{"@type":"BreadcrumbList","@id":"https:\/\/swapnilzambare.com\/blog\/what-is-apex-programming-language\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/swapnilzambare.com\/blog\/"},{"@type":"ListItem","position":2,"name":"What is Apex programming language"}]},{"@type":"WebSite","@id":"https:\/\/swapnilzambare.com\/blog\/#website","url":"https:\/\/swapnilzambare.com\/blog\/","name":"Swapnil SFDC | Salesforce Blog","description":"Hey trailblazers, Welcome to Swapnil SFDC world.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/swapnilzambare.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/8ababd34e5d3bc24fa10df2a87c5ac45","name":"Swapnil","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/swapnilzambare.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/50610dedda801c6c795bfc5b650f7f4ed5f7c34b3b5c9c7148d702eb351c003b?s=96&d=mm&r=g","caption":"Swapnil"},"url":"https:\/\/swapnilzambare.com\/blog\/author\/swapnil-zambare\/"}]}},"_links":{"self":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/comments?post=226"}],"version-history":[{"count":3,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"predecessor-version":[{"id":325,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/posts\/226\/revisions\/325"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media\/114"}],"wp:attachment":[{"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swapnilzambare.com\/blog\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}