{"id":19389,"date":"2020-07-11T13:39:02","date_gmt":"2020-07-11T20:39:02","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=19389"},"modified":"2023-12-01T03:54:44","modified_gmt":"2023-12-01T11:54:44","slug":"lambda-expressions-java","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/","title":{"rendered":"Lambda Expressions in Java: A Guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">How to Use Lambda Expressions in Java<\/h2>\n\n\n\n<p>Have you ever thought that some methods could fit on one line, if only it weren\u2019t for the verbose Java syntax that you\u2019ve got to use to declare a method? You\u2019re not the only one.<br><\/p>\n\n\n\n<p>Methods are an incredibly useful feature in programming.<br><\/p>\n\n\n\n<p>A method is a block of code that does something specific in your program. They\u2019re used because once you define a method, you can call it multiple times. This helps reduce redundancy in your code, which in turn makes it easier to maintain your code.<br><\/p>\n\n\n\n<p>In this guide, we\u2019re going to talk about lambda expressions in Java. These are a special type of method that you can use called a lambda expression, which implements a functional interface. We\u2019ll talk about how they work and why they are used.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Functional Interface?<\/h2>\n\n\n\n<p>Before we go on to talk about lambda expressions, you\u2019ve got to understand functional interfaces. These are interfaces that only contain one abstract method. The one abstract method contained within a functional interface states the purpose of the interface.<br><\/p>\n\n\n\n<p>Consider this example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>interface CalculateThree {\n\tdouble multiply_by_three(String day);\n}<\/pre><\/div>\n\n\n\n<p>We\u2019ve created an interface called CalculateThree. This interface only has one method, <code>multiply_by_three<\/code>, which means that it is a functional interface.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is a Java Lambda Expression?<\/h2>\n\n\n\n<p>A lambda expression is an unnamed method. It is used to implement a method that has been defined within a functional interface. Lambda expressions are sometimes called anonymous methods on account of how they don\u2019t have a name.<br><\/p>\n\n\n\n<p>Lambda expressions make use of the arrow operator, which divides them into two sections:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>(parameter list) -&gt; lambda body<\/pre><\/div>\n\n\n\n<p>The left side contains the parameters that the expression uses; the right side contains the code that will be run when the Lambda expression is executed. Lambda functions can accept a single parameter or multiple parameters.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Use a Lambda Expression<\/h2>\n\n\n\n<p>Let\u2019s create a program that takes in a number inserted by a user and multiplies it by three. We\u2019ll start by writing the code that accepts a number from a user:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import java.util.Scanner;\nclass Main {\npublic static void main(String args[]) {\n\tScanner user_input = new Scanner(System.in);\n\tSystem.out.println(\"Insert a number to multiply by three: \");\n\tdouble user_number = user_input.nextDouble();\n\t}\n}<\/pre><\/div>\n\n\n\n<p>When we run this code, our user will be prompted to insert a number to multiply. Our program will read that number into the variable \u201cuser_number\u201d. You can learn more about how the Scanner class works by reading our <a href=\"https:\/\/careerkarma.com\/blog\/java-input\/\">tutorial on Java Scanner<\/a>.<br><\/p>\n\n\n\n<p>Next, we\u2019re going to define a lambda expression to multiply the number by three. Paste in the following code above your <code>main<\/code> method:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>interface CalculateThree {\n\tdouble multiply_by_three(double number); \n}<\/pre><\/div>\n\n\n\n<p>This code defines the interface to which our lambda expression will refer. Then add the following code at the bottom of the main method in the class:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>CalculateThree multiply = (number) -&gt; number * 3;\ndouble answer = multiply.multiply_by_three(user_number);\nSystem.out.println(user_number + \" multiplied by three is \" + answer);<\/pre><\/div>\n\n\n\n<p>We\u2019ve used the CalculateThree interface to declare a variable called \u201cmultiply\u201d. This stores the code for our lambda expression. The lambda expression is associated with <code>multiply_by_three<\/code> in our CalculateThree interface because <code>multiply_by_three<\/code> is the only function in the interface.<br><\/p>\n\n\n\n<p>We\u2019ve then used dot notation to call this function:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>multiply.multiply_by_three(user_number);<\/pre><\/div>\n\n\n\n<p>Dot notation is where you specify the name of the class or interface you want to reference, followed by a dot, then the name of the method that you want to access. In this case, we want to access the <code>multiply_by_three<\/code> method inside the \u201cmultiply\u201d interface.<br><\/p>\n\n\n\n<p>Our final code looks like this:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import java.util.Scanner;\ninterface CalculateThree {\n\tdouble multiply_by_three(double number);\n}\nclass Main {\npublic static void main(String args[]) {\n\tScanner user_input = new Scanner(System.in);\n\tSystem.out.println(\"Insert a number to multiply by three: \");\n\tdouble user_number = user_input.nextDouble();\n\tCalculateThree multiply = (number) -&gt; number * 3;\n\tdouble answer = multiply.multiply_by_three(user_number);\n\tSystem.out.println(user_number + \" multiplied by three is \" + answer);\n\t}\n}<\/pre><\/div>\n\n\n\n<p>Let\u2019s run our code and insert the number 3 to multiply:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>Insert a number to multiply by three:\n3\n3.0 multiplied by three is 9.0<\/pre><\/div>\n\n\n\n<p>Our code has successfully multiplied the number we inserted by 3. This action was performed using the lambda expression that we defined.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Use a Block Lambda Expression<\/h2>\n\n\n\n<p>Lambda expressions can appear in two forms: using single expressions, or using blocks. The block lambda syntax is used when the code on the right hand side of the arrow will take up multiple lines.<br><\/p>\n\n\n\n<p>The block syntax is where you surround the code in the right hand side of a lambda expression with curly braces ({}).<\/p>\n\n\n\n<p>Consider this example:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>interface GreetUser {\n\tString welcome_user(String name);\n}\nclass Main {\npublic static void main(String args[]) {\n\tGreetUser send_greeting = (name) -&gt; {\n\t\tSystem.out.println(\"Good morning!\");\n\t\tSystem.out.println(\"Welcome, \" + name);\n\t};\n\tSystem.out.println(send_greeting.welcome_user(\"Brad\"));\n\t}\n}<\/pre><\/div>\n\n\n\n<p>We\u2019ve declared a lambda expression called <code>send_greeting<\/code>. This expression refers to the interface GreetUser that we defined at the start of our program. Our lambda expression performs two actions. It:<br><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Prints \u201cGood morning!\u201d to the console<\/li>\n\n\n\n<li>Prints \u201cWelcome, \u201d, followed by the user\u2019s name, to the console<\/li>\n<\/ul>\n\n\n\n<p>Because this takes up two lines of code, we\u2019ve used the block syntax. The code on the right hand side of our lambda expression is enclosed within curly braces.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Lambda expressions are unnamed methods that implement a functional interface. These functions are sometimes called anonymous classes or functions because they don\u2019t have a name and they do not execute on their own.<br><\/p>\n\n\n\n<p>Are you up for a challenge? Write a lambda expression that checks whether or not a number is even. If it is, \u201cX is even\u201d should be printed to the console, where X is the number being tested; otherwise, \u201cX is odd\u201d should be printed to the console.<br><\/p>\n\n\n\n<p>Now you\u2019re ready to start working with lambda expressions in Java like an expert!<\/p>\n","protected":false},"excerpt":{"rendered":"How to Use Lambda Expressions in Java Have you ever thought that some methods could fit on one line, if only it weren\u2019t for the verbose Java syntax that you\u2019ve got to use to declare a method? You\u2019re not the only one. Methods are an incredibly useful feature in programming. A method is a block&hellip;","protected":false},"author":240,"featured_media":3627,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17289],"tags":[],"class_list":{"0":"post-19389","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-java"},"acf":{"post_sub_title":"","sprint_id":"","query_class":"Java","school_sft":"","parent_sft":"","school_privacy_policy":"","has_review":"","is_sponser_post":"","is_guest_post":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.4 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Lambda Expressions in Java: A Guide | Career Karma<\/title>\n<meta name=\"description\" content=\"Lambda expressions are unnamed methods that extend an interface. On Career Karma, learn how lambda expressions in Java work.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lambda Expressions in Java: A Guide\" \/>\n<meta property=\"og:description\" content=\"Lambda expressions are unnamed methods that extend an interface. On Career Karma, learn how lambda expressions in Java work.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/\" \/>\n<meta property=\"og:site_name\" content=\"Career Karma\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/facebook.com\/careerkarmaapp\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-11T20:39:02+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T11:54:44+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"801\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"James Gallagher\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@career_karma\" \/>\n<meta name=\"twitter:site\" content=\"@career_karma\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"James Gallagher\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/\"},\"author\":{\"name\":\"James Gallagher\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"headline\":\"Lambda Expressions in Java: A Guide\",\"datePublished\":\"2020-07-11T20:39:02+00:00\",\"dateModified\":\"2023-12-01T11:54:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/\"},\"wordCount\":819,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg\",\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/\",\"name\":\"Lambda Expressions in Java: A Guide | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg\",\"datePublished\":\"2020-07-11T20:39:02+00:00\",\"dateModified\":\"2023-12-01T11:54:44+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\"},\"description\":\"Lambda expressions are unnamed methods that extend an interface. On Career Karma, learn how lambda expressions in Java work.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/07\\\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg\",\"width\":1200,\"height\":801},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/lambda-expressions-java\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Lambda Expressions in Java: A Guide\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/\",\"name\":\"Career Karma\",\"description\":\"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/e79364792443fbff794a144c67ec8e94\",\"name\":\"James Gallagher\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/01\\\/james-gallagher-150x150.jpg\",\"caption\":\"James Gallagher\"},\"description\":\"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/jamesgallagher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Lambda Expressions in Java: A Guide | Career Karma","description":"Lambda expressions are unnamed methods that extend an interface. On Career Karma, learn how lambda expressions in Java work.","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:\/\/careerkarma.com\/blog\/lambda-expressions-java\/","og_locale":"en_US","og_type":"article","og_title":"Lambda Expressions in Java: A Guide","og_description":"Lambda expressions are unnamed methods that extend an interface. On Career Karma, learn how lambda expressions in Java work.","og_url":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2020-07-11T20:39:02+00:00","article_modified_time":"2023-12-01T11:54:44+00:00","og_image":[{"width":1200,"height":801,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg","type":"image\/jpeg"}],"author":"James Gallagher","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"James Gallagher","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/"},"author":{"name":"James Gallagher","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"headline":"Lambda Expressions in Java: A Guide","datePublished":"2020-07-11T20:39:02+00:00","dateModified":"2023-12-01T11:54:44+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/"},"wordCount":819,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg","articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/","url":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/","name":"Lambda Expressions in Java: A Guide | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg","datePublished":"2020-07-11T20:39:02+00:00","dateModified":"2023-12-01T11:54:44+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94"},"description":"Lambda expressions are unnamed methods that extend an interface. On Career Karma, learn how lambda expressions in Java work.","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2019\/07\/maximilian-weisbecker-1td5Iq5IvNc-unsplash.jpg","width":1200,"height":801},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/lambda-expressions-java\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/careerkarma.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/careerkarma.com\/blog\/java\/"},{"@type":"ListItem","position":3,"name":"Lambda Expressions in Java: A Guide"}]},{"@type":"WebSite","@id":"https:\/\/careerkarma.com\/blog\/#website","url":"https:\/\/careerkarma.com\/blog\/","name":"Career Karma","description":"Latest Coding Bootcamp News &amp; Career Hacks from Industry Insiders","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/careerkarma.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/e79364792443fbff794a144c67ec8e94","name":"James Gallagher","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2020\/01\/james-gallagher-150x150.jpg","caption":"James Gallagher"},"description":"James Gallagher is a self-taught programmer and the technical content manager at Career Karma. He has experience in range of programming languages and extensive expertise in Python, HTML, CSS, and JavaScript. James has written hundreds of programming tutorials, and he frequently contributes to publications like Codecademy, Treehouse, Repl.it, Afrotech, and others.","url":"https:\/\/careerkarma.com\/blog\/author\/jamesgallagher\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/19389","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/users\/240"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=19389"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/19389\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/3627"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=19389"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=19389"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=19389"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}