{"id":29388,"date":"2021-02-26T11:38:05","date_gmt":"2021-02-26T19:38:05","guid":{"rendered":"https:\/\/careerkarma.com\/blog\/?p=29388"},"modified":"2021-03-29T04:04:00","modified_gmt":"2021-03-29T11:04:00","slug":"java-null-pointer-exception","status":"publish","type":"post","link":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/","title":{"rendered":"How to Solve java.lang.NullPointerException Error"},"content":{"rendered":"\n<p>You must have come across something called a NullPointerException if you have worked on Java-based applications. The Null Pointer Exception is one of the most common errors in Java application development. This exception is usually the result of a human error, buttime can get wasted on debugging errors like this one. This issue is not entirely a syntactical error, so it can get tricky to identify the problem at times.<br><\/p>\n\n\n\n<p>In this article, we take a look at what java.lang.NullPointerException is, why does it happen, how you can fix it, and some of the best practices to follow to avoid running into wild null pointers. Without further ado, let\u2019s begin.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is java.lang.NullPointerException?<\/h2>\n\n\n\n<p>The Null Pointer Exception is one of the several Exceptions supported by the Java language. This indicates that an attempt has been made to access a reference variable that currently points to null.<br><\/p>\n\n\n\n<p>Null is the default value in Java assigned to the variables which are not initialized by the user after or with a declaration. Consider the following example where you declare a variable like this:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>String str;<\/pre><\/div>\n\n\n\n<p>And then try to print the contents of the variable:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>System.out.println(str);\n\/\/ =&gt; null<\/pre><\/div>\n\n\n\n<p>As can be seen above, \u2018null\u2019 gets printed on the output. This shows that since the variable str is uninitialized, it currently points to, or holds the value, null. The issue that a null pointing variable poses is that the variable is only a reference, and it does not point to anything. If you try to carry out some operations on the data stored in a null pointing variable, the system will not know what to do. This happens because there is no data actually stored in the variable; it points to a void entity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Example of java.lang.NullPointer.Exception<\/h2>\n\n\n\n<p>Looking for examples of java.lang.NullPointerException is not a difficult task, as all you need to do is not initialize a variable before trying to access it. For instance, let\u2019s consider the StringBuilder class. StringBuilder is a class that is used to handle the formation and manipulation of strings. Here\u2019s how you would normally use the class to create strings:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import java.util.StringBuilder;\n\npublic class Test {\n  public static void main(String[] args) {\n    StringBuilder sb = new StringBuilder();\n\n    sb.append(&quot;Hello &quot;);\n    sb.append(&quot;World!&quot;);\n   \n    String result = sb.toString();\n\n    System.out.println(result);\n    \/\/ =&gt; Hello World!\n  }\n}<\/pre><\/div>\n\n\n\n<p>If you run the above snippet, it will work just fine. Let\u2019s take a look at its modified version that will throw a null pointer exception:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>import java.util.StringBuilder;\n\npublic class Test {\n  public static void main(String[] args) {\n    StringBuilder sb;\n\n    sb.append(&quot;Hello &quot;);\n    sb.append(&quot;World!&quot;);\n   \n    String result = sb.toString();\n\n    System.out.println(result);\n  }\n}<\/pre><\/div>\n\n\n\n<p>As you can see, we did not initialize an instance of the StringBuilder class while declaring it. When the <code>sb.append()<\/code> lines are executed, sb does not point to any object in reality, rather it points to null. This is where a NullPointerException gets thrown. Due to the exception being thrown, the JVM cannot execute any statements after this.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Fix java.lang.NullPointerException Error<\/h2>\n\n\n\n<p>Creating a Null Pointer Exception is easy, but avoiding or fixing it is tricky. While some integrated development environments (IDEs) warn you if you are accessing a variable before initializing it with some compatible value, most IDEs can not figure this out in complex situations, such as when passing a variable through multiple method calls. The exact fix for a Null Pointer Exception depends upon your situation and code. Here are some of the top ways to fix common Null Pointer scenarios:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check Your Code For Manual Errors<\/h3>\n\n\n\n<p>The biggest reason why Null Pointer Exceptions occur is human error. Make sure the program you have written carries the correct logic that you had initially intended. Also, run your eyes through the source code to check if you have missed out any statements, or misspelled any variables which may have led to some variable not being assigned a value.<br><\/p>\n\n\n\n<p>Ensure that you have written your code the way your logic directs you to, and you have not missed out on writing any statements, or have not assigned objects to wrong references. As a rule of thumb, check that before any variable is used, it is initialized with an object.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Put Safety Checks Around Code That May Cause Null Pointer Exception<\/h3>\n\n\n\n<p>If you know the line of code that is causing your NullPointer and believe your logic is correct as well, you can wrap the section of code in a try-catch block, and define the behavior for when a Null Pointer is caught. This is how such a set-up will look like:<br><\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>...\n\/\/ Some code above\n\ntry {\n  \/\/ Put the exception-prone code here\n} catch (NullPointerException npe) {\n  \/\/ Define what needs to be done when an NPE is caught\n}\n\n\/\/ Some code below\n...<\/pre><\/div>\n\n\n\n<p>This happens in situations where a certain reference variable may or may not contain null. More often than not, remote API responses, device interface responses are prone to this scenario. Depending upon the availability of a result or hardware, the response variable may or may not point to an instantiated object. Using safety checks is best-suited to handle these situations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Check For Null Before Accessing Something<\/h3>\n\n\n\n<p>This method is similar to the try-catch method. In this method, an \u2018if\u2019 block is used to check for null values before accessing a variable. Here\u2019s how the previous snippet of code would look like if an \u2018if\u2019 block is used to catch the error:<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>...\n\/\/ Some code above\n\nIf (myVar !== null ) {\n  \/\/ Put the success logic here\n} else {\n  \/\/ Handle null value here\n}\n\n\/\/ Some code below\n...<\/pre><\/div>\n\n\n\n<p>The biggest difference between the two methods is the scope of checks that they do. The if method checks the myVar variable only for null values, while the try-catch block catches any and all variables that are null.<br><\/p>\n\n\n\n<p>This makes the \u2018if\u2019 block a more targeted and clean approach to accommodating null pointers in your application logic. However, if there is more than one variable that may be null, it is better to go with a try-catch block for simplicity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>This article took a look at what Null Pointer Exception is in Java, and how this error occurs. We also looked at a piece of code that will cause a Null Pointer Exception to understand how Null Pointers are created in real-life situations. Finally, we set down to identify some of the top ways to fix a Null Pointer Exception and ended our discussion by contrasting between two methods of fixing NPEs.<br><\/p>\n\n\n\n<p>If you are looking to write Java programs, a Null Pointer Exception is one of the essential bugs that you must know how to fix. This exception is one of the most frequent issues and is not related to your code\u2019s syntax or semantics. This makes the exception one of the trickiest problems to identify and fix. A quick reference for fixing the issue like this article is bound to make your experience smoother.<\/p>\n","protected":false},"excerpt":{"rendered":"You must have come across something called a NullPointerException if you have worked on Java-based applications. The Null Pointer Exception is one of the most common errors in Java application development. This exception is usually the result of a human error, buttime can get wasted on debugging errors like this one. This issue is not&hellip;","protected":false},"author":113,"featured_media":29389,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[17289],"tags":[],"class_list":{"0":"post-29388","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":null,"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>How to Solve java.lang.NullPointerException Error | Career Karma<\/title>\n<meta name=\"description\" content=\"If you have worked on Java-based applications, you must have come across something called a NullPointerException. In this article, we take a look at what NPE is, and how you can fix it!\" \/>\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\/java-null-pointer-exception\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Solve java.lang.NullPointerException Error\" \/>\n<meta property=\"og:description\" content=\"If you have worked on Java-based applications, you must have come across something called a NullPointerException. In this article, we take a look at what NPE is, and how you can fix it!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/\" \/>\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=\"2021-02-26T19:38:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-29T11:04:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"768\" \/>\n\t<meta property=\"og:image:height\" content=\"960\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kumar Harsh\" \/>\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=\"Kumar Harsh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/\"},\"author\":{\"name\":\"Kumar Harsh\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/c34979f56af7fa3dfafc6ab2aa4ac400\"},\"headline\":\"How to Solve java.lang.NullPointerException Error\",\"datePublished\":\"2021-02-26T19:38:05+00:00\",\"dateModified\":\"2021-03-29T11:04:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/\"},\"wordCount\":1057,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg\",\"articleSection\":[\"Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/\",\"name\":\"How to Solve java.lang.NullPointerException Error | Career Karma\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg\",\"datePublished\":\"2021-02-26T19:38:05+00:00\",\"dateModified\":\"2021-03-29T11:04:00+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/#\\\/schema\\\/person\\\/c34979f56af7fa3dfafc6ab2aa4ac400\"},\"description\":\"If you have worked on Java-based applications, you must have come across something called a NullPointerException. In this article, we take a look at what NPE is, and how you can fix it!\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#primaryimage\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/02\\\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg\",\"width\":768,\"height\":960,\"caption\":\"white ceramic mug with Java written on a side\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/java-null-pointer-exception\\\/#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\":\"How to Solve java.lang.NullPointerException Error\"}]},{\"@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\\\/c34979f56af7fa3dfafc6ab2aa4ac400\",\"name\":\"Kumar Harsh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/Kumar-Harsh-150x150.jpg\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/Kumar-Harsh-150x150.jpg\",\"contentUrl\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/01\\\/Kumar-Harsh-150x150.jpg\",\"caption\":\"Kumar Harsh\"},\"description\":\"Kumar is a young technical writer, covering topics like JavaScript, Python, Ruby and Web Performance. He is currently working towards a bachelors degree in Computer Science and Engineering at National Institute of Technology Patna. Along with writing, he has also worked in software development roles with several start-ups and corporations alike. He joined the Career Karma team in January 2021.\",\"url\":\"https:\\\/\\\/careerkarma.com\\\/blog\\\/author\\\/kumar-harsh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Solve java.lang.NullPointerException Error | Career Karma","description":"If you have worked on Java-based applications, you must have come across something called a NullPointerException. In this article, we take a look at what NPE is, and how you can fix it!","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\/java-null-pointer-exception\/","og_locale":"en_US","og_type":"article","og_title":"How to Solve java.lang.NullPointerException Error","og_description":"If you have worked on Java-based applications, you must have come across something called a NullPointerException. In this article, we take a look at what NPE is, and how you can fix it!","og_url":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/","og_site_name":"Career Karma","article_publisher":"http:\/\/facebook.com\/careerkarmaapp","article_published_time":"2021-02-26T19:38:05+00:00","article_modified_time":"2021-03-29T11:04:00+00:00","og_image":[{"width":768,"height":960,"url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg","type":"image\/jpeg"}],"author":"Kumar Harsh","twitter_card":"summary_large_image","twitter_creator":"@career_karma","twitter_site":"@career_karma","twitter_misc":{"Written by":"Kumar Harsh","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#article","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/"},"author":{"name":"Kumar Harsh","@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/c34979f56af7fa3dfafc6ab2aa4ac400"},"headline":"How to Solve java.lang.NullPointerException Error","datePublished":"2021-02-26T19:38:05+00:00","dateModified":"2021-03-29T11:04:00+00:00","mainEntityOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/"},"wordCount":1057,"commentCount":0,"image":{"@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg","articleSection":["Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/","url":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/","name":"How to Solve java.lang.NullPointerException Error | Career Karma","isPartOf":{"@id":"https:\/\/careerkarma.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#primaryimage"},"image":{"@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#primaryimage"},"thumbnailUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg","datePublished":"2021-02-26T19:38:05+00:00","dateModified":"2021-03-29T11:04:00+00:00","author":{"@id":"https:\/\/careerkarma.com\/blog\/#\/schema\/person\/c34979f56af7fa3dfafc6ab2aa4ac400"},"description":"If you have worked on Java-based applications, you must have come across something called a NullPointerException. In this article, we take a look at what NPE is, and how you can fix it!","breadcrumb":{"@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#primaryimage","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/02\/michiel-leunens-0wIHsm2_1fc-unsplash.jpg","width":768,"height":960,"caption":"white ceramic mug with Java written on a side"},{"@type":"BreadcrumbList","@id":"https:\/\/careerkarma.com\/blog\/java-null-pointer-exception\/#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":"How to Solve java.lang.NullPointerException Error"}]},{"@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\/c34979f56af7fa3dfafc6ab2aa4ac400","name":"Kumar Harsh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/01\/Kumar-Harsh-150x150.jpg","url":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/01\/Kumar-Harsh-150x150.jpg","contentUrl":"https:\/\/careerkarma.com\/blog\/wp-content\/uploads\/2021\/01\/Kumar-Harsh-150x150.jpg","caption":"Kumar Harsh"},"description":"Kumar is a young technical writer, covering topics like JavaScript, Python, Ruby and Web Performance. He is currently working towards a bachelors degree in Computer Science and Engineering at National Institute of Technology Patna. Along with writing, he has also worked in software development roles with several start-ups and corporations alike. He joined the Career Karma team in January 2021.","url":"https:\/\/careerkarma.com\/blog\/author\/kumar-harsh\/"}]}},"_links":{"self":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/29388","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\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/comments?post=29388"}],"version-history":[{"count":0,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/posts\/29388\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media\/29389"}],"wp:attachment":[{"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/media?parent=29388"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/categories?post=29388"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/careerkarma.com\/blog\/wp-json\/wp\/v2\/tags?post=29388"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}