{"id":10106,"date":"2020-10-06T10:31:39","date_gmt":"2020-10-06T10:31:39","guid":{"rendered":"https:\/\/www.experfy.com\/blog\/?p=10106"},"modified":"2023-10-24T17:44:50","modified_gmt":"2023-10-24T17:44:50","slug":"rewiring-your-brain-from-python-to-java","status":"publish","type":"post","link":"https:\/\/www.experfy.com\/blog\/bigdata-cloud\/rewiring-your-brain-from-python-to-java\/","title":{"rendered":"Rewiring Your Brain from Python to Java"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"10106\" class=\"elementor elementor-10106\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-66a3fea6 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"66a3fea6\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2622124e\" data-id=\"2622124e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-177f6ecf elementor-widget elementor-widget-text-editor\" data-id=\"177f6ecf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tSeven conceptual hurdles you might face when learning a new programming language\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-a5c33eb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"a5c33eb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-95fa17b\" data-id=\"95fa17b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9514a43 elementor-widget elementor-widget-text-editor\" data-id=\"9514a43\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tConfession: my personal experience is almost the complete opposite of the title of this article. I actually started with C++ in college, moved to Java to teach AP Computer Science A, and then entered Python territory to work with all of the snazzy data science libraries available. Now that I\u2019m working on a Java project again (a\u00a0<a href=\"https:\/\/github.com\/danhales\/java-neural-network\" target=\"_blank\" rel=\"noreferrer noopener\">neural network package<\/a>\u00a0that is really pushing my understanding of the underlying math to its limits), I\u2019m really paying attention to the little differences in how the languages work. In particular, I\u2019ve been making notes about the places where standard Python habits can become huge roadblocks when traveling through Java.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-f6f75f5 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f6f75f5\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-e15da10\" data-id=\"e15da10\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-861a32b elementor-widget elementor-widget-image\" data-id=\"861a32b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"576\" height=\"432\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_S771SUt26LOdBzJLjFsyWg.jpeg\" class=\"attachment-large size-large wp-image-33698\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_S771SUt26LOdBzJLjFsyWg.jpeg 576w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_S771SUt26LOdBzJLjFsyWg-300x225.jpeg 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-cabd940 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"cabd940\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-37d31ca\" data-id=\"37d31ca\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c5f8d13 elementor-widget elementor-widget-text-editor\" data-id=\"c5f8d13\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This post is directed at Python programmers (in particular, <a href=\"https:\/\/www.experfy.com\/blog\/how-to-build-a-data-science-web-app-in-python\/\" target=\"_blank\" rel=\"noreferrer noopener\">data scientists<\/a>) traveling in the opposite lane; I\u2019ll detail some of the initial conceptual hurdles you may face when learning to adapt your Python instincts to Java territory. In particular, I\u2019m going to be avoiding superficial differences like\u00a0<code>snake_case<\/code>\u00a0vs\u00a0<code>camelCase<\/code>\u00a0or how Java requires you to end a statement with a semicolon while Python makes it optional. I\u2019m also going to avoid diving too deeply into OOP vs. functional programming. The focus of this post is the way in which Java requires you to think differently about how to solve whatever problem you\u2019re working on.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-3822e34 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3822e34\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-00014ef\" data-id=\"00014ef\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-e49479b elementor-widget elementor-widget-text-editor\" data-id=\"e49479b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Although it may seem daunting, just remember that many programmers before you have successfully learned Java, so it absolutely can be done.<\/p>\n<\/blockquote>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-27e3c88 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"27e3c88\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-175e9df\" data-id=\"175e9df\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0a2cb27 elementor-widget elementor-widget-heading\" data-id=\"0a2cb27\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">1. Java has more overhead than you\u2019re used to.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-27d5029 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"27d5029\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-badc87b\" data-id=\"badc87b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-7a7515f elementor-widget elementor-widget-text-editor\" data-id=\"7a7515f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIn Python, you can write an entire \u201cHello World\u201d program with console output in a single line of code:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">print('Oh hi there, globe')<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b26ae22 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b26ae22\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-25cf54e\" data-id=\"25cf54e\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-20809df elementor-widget elementor-widget-text-editor\" data-id=\"20809df\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"06e3\">To accomplish this in Java, you need to create an\u00a0<em>entire class<\/em>, complete with a\u00a0<code>main<\/code>\u00a0method to serve as the entry point.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">public class Room {<br \/>    public static void main(String[] args) {<br \/>        System.out.println(\"Oh hi there, globe\");<br \/>   }<br \/>}<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-8d25114 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"8d25114\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3a4cd4d\" data-id=\"3a4cd4d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-573afca elementor-widget elementor-widget-text-editor\" data-id=\"573afca\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAt its heart, every Java program is essentially some class\u2019s\u00a0<code>main<\/code>\u00a0method working with variables and telling other classes what to do (and sometimes, that\u00a0<code>main<\/code>\u00a0method is hidden deep within automated files, like with Android projects). Although there are some ways to run Java outside of a complete class\u2013\u2013I was a big fan of the\u00a0<code>interactions<\/code>\u00a0tab in\u00a0<a href=\"https:\/\/www.jgrasp.org\/\" rel=\"noopener\">jgrasp<\/a>\u00a0while teaching\u2013\u2013there are some hoops to jump through to make this happen.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3300765 elementor-widget elementor-widget-text-editor\" data-id=\"3300765\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIn short, while Python allows you to feed a few commands directly into the interpreter to test out an algorithm, working with Java requires you to place that code in context.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-64afbe1 elementor-widget elementor-widget-text-editor\" data-id=\"64afbe1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAnd then there\u2019s the elephant in the\u00a0<code>Room<\/code>\u00a0above:\u00a0<code>System.out.println()<\/code>\u00a0. This seems like way more work than it should be just to produce console output, right? That\u2019s because we\u2019re being very, very particular about how we want our output to be displayed; out of all of the different places we could put that text, we want it to go to the\u00a0<em>console<\/em>, as opposed to a log file, a pop-up window, or a server off in the ether. Python, by default\u00a0<em>assumes<\/em>\u00a0that by\u00a0<code>print<\/code>\u00a0you want the text displayed on the console, but Java does not generally make assumptions like that.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-d119743 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"d119743\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-345cbfd\" data-id=\"345cbfd\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5a20f61 elementor-widget elementor-widget-text-editor\" data-id=\"5a20f61\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThis leads to our next point\u2026\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-6c36067 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6c36067\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-009d45c\" data-id=\"009d45c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1770b84 elementor-widget elementor-widget-heading\" data-id=\"1770b84\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">2. Java requires you to be way more specific than Python.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-11864ab elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"11864ab\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bfbe0ee\" data-id=\"bfbe0ee\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-03d89e8 elementor-widget elementor-widget-text-editor\" data-id=\"03d89e8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tPython lets you get away with a\u00a0<em>lot.\u00a0<\/em>Think about how many times you\u2019ve written code like:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">that_value_i_need = some_object.mystery_method()<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a5629f7 elementor-widget elementor-widget-text-editor\" data-id=\"a5629f7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"2fe9\">only to have to follow it up with:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">type(that_value_i_need)<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-66413fa elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"66413fa\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-68f2099\" data-id=\"68f2099\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1e4db05 elementor-widget elementor-widget-text-editor\" data-id=\"1e4db05\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIn order to figure out what, exactly,\u00a0<code>mystery_method()<\/code>\u00a0is returning.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-54e5592 elementor-widget elementor-widget-text-editor\" data-id=\"54e5592\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThis isn\u2019t necessarily the best way to go about things; obviously, the docs should explain what you\u2019re going to get from\u00a0<code>mystery_method()<\/code>\u00a0, so it\u2019s definitely\u00a0<em>possible<\/em>\u00a0that you already know what you\u2019re getting before you call it. But Python lets you get away with this. You can create a variable for\u00a0<code>that_value_i_need<\/code>\u00a0and know that it can handle whatever\u00a0<code>mystery_method()<\/code>\u00a0spits out.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-be4d008 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"be4d008\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-ca181dd\" data-id=\"ca181dd\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8fe9ead elementor-widget elementor-widget-text-editor\" data-id=\"8fe9ead\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tFurthermore, you can be pretty confident that you can pull off a high-wire act like this, without even having to think about the data types involved:\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">important_value = some_method(a, bunch, of, arguments)<br \/>important_value = unrelated_class.another_method()<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-771a9e2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"771a9e2\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c5ce3f6\" data-id=\"c5ce3f6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-879dd1c elementor-widget elementor-widget-text-editor\" data-id=\"879dd1c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAfter all,\u00a0<code>important_value<\/code>\u00a0is just a variable, which can hold any data type it needs to\u2026 right?\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e3a9085 elementor-widget elementor-widget-text-editor\" data-id=\"e3a9085\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIn Java, this is absolutely not the case. When declaring a variable, you need to specify its data type from the get-go, and then you\u2019re locked in throughout its lifetime.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-665402c elementor-widget elementor-widget-text-editor\" data-id=\"665402c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tWhile this might sound daunting and restrictive at first, I find that reading somebody else\u2019s code is\u00a0<em>so much easier<\/em>\u00a0in Java. I can confidently point to a variable and say, \u201c<code>x<\/code>\u00a0is an\u00a0<code>int<\/code>\u00a0, because it was declared as an\u00a0<code>int<\/code>on line 72. If it\u2019s holding a value returned by\u00a0<code>someUsefulMethod<\/code>\u00a0, that tells me<code>someUsefulMethod<\/code>\u00a0returns an\u00a0<code>int<\/code>\u00a0(or something that can be promoted to an\u00a0<code>int<\/code>\u00a0, like a\u00a0<code>short<\/code>\u00a0).\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dbc6ff4 elementor-widget elementor-widget-text-editor\" data-id=\"dbc6ff4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAlthough this initially presents you with what feels like an impenetrable wall of reserved words floating around in everyone else\u2019s code and\u00a0<code>error: cannot find symbol<\/code>messages when you try to run yours, the fact that Java requires you to be so specific leads to code being significantly more self-documenting, predictable, and unambiguous than Python. And although I need to be way more meticulous when writing my Java code, I feel significantly more confident in understanding how it works.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-de9d136 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"de9d136\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a5fb070\" data-id=\"a5fb070\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c0e59e5 elementor-widget elementor-widget-image\" data-id=\"c0e59e5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"576\" height=\"864\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_lm3dTKr0aGQ0yk9xlPbvJw.jpeg\" class=\"attachment-large size-large wp-image-33699\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_lm3dTKr0aGQ0yk9xlPbvJw.jpeg 576w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_lm3dTKr0aGQ0yk9xlPbvJw-200x300.jpeg 200w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2cf3e89 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2cf3e89\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a12b6f3\" data-id=\"a12b6f3\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2e8696d elementor-widget elementor-widget-text-editor\" data-id=\"2e8696d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tSpeaking of documentation,\u00a0<code>javadoc<\/code>\u00a0is a powerful tool for generating clean documentation\u2013\u2013even if you haven\u2019t explicitly written comments (which you should).\u00a0<code>javadoc<\/code>\u00a0will read your code and generate organized html files indicating exactly what data types you need to pass a method and what value you can get in return. Most IDEs even have a button that will do this for you.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b14f8b5 elementor-widget elementor-widget-text-editor\" data-id=\"b14f8b5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAnd in order to keep things as unambiguous as possible\u2026\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-f195d83 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"f195d83\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-c3b8324\" data-id=\"c3b8324\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1e554e5 elementor-widget elementor-widget-heading\" data-id=\"1e554e5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">3. Java is more strict than Python.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-659aa77 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"659aa77\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d4f908f\" data-id=\"d4f908f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2925e83 elementor-widget elementor-widget-text-editor\" data-id=\"2925e83\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tLet\u2019s revisit our Hello World program in Python. How many different ways could we write it?<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\"># version 1 - single quotes<br \/>print('Oh hi there, globe')# version 2 - double quotes<br \/>print(\"Oh hi there, globe\")# version 3 - triple single quotes<br \/>print('''Oh hi there, globe''')# version 4 - uh, triple double quotes, because why not?<br \/>print(\"\"\"Oh hi there, globe\"\"\")<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-cbd977c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"cbd977c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-26f45a7\" data-id=\"26f45a7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-693563f elementor-widget elementor-widget-text-editor\" data-id=\"693563f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tPython gives you a lot of options for accomplishing the same task\u2013\u2013in the above example, we can enclose our string with four distinct syntaxes. This legitimately threw me for a loop when I was learning Python; how could I know which one to use, and when? Is there an elegant rule of thumb to remember?\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-27129ff elementor-widget elementor-widget-text-editor\" data-id=\"27129ff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIf you\u2019re a Python programmer with even a tiny amount of experience, you already know what\u2019s coming: \u201cMost people just go with single quotes. Unless there\u2019s an apostrophe in the string, in which case you can enclose it with double quotes. Unless there\u2019s both an apostrophe and a double quote in the string, in which case you can enclose it in triple single quotes. And I guess if you have single, double, triple single and triple double quotes inside your string, then you can always just go back to single quotes and use an escape character wherever you need it.\u201d\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-73db61d elementor-widget elementor-widget-text-editor\" data-id=\"73db61d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tBecause Java is so specific and so strict, learning to work with\u00a0<code>String<\/code>\u00a0s is significantly more straightforward: Always enclose them in double quotes. If you have a double quote inside your\u00a0<code>String<\/code>\u00a0, put an escape character\u00a0<code><\/code>\u00a0before it:\u00a0<code>\u201d<\/code>. If you have a\u00a0<code><\/code>inside your\u00a0<code>String<\/code>, put an escape character before it:\u00a0<code>\\<\/code>. If you ever see single quotes, like with\u00a0<code>'a'<\/code>\u00a0, that means you\u2019re dealing with a\u00a0<code>char<\/code>\u00a0, not a\u00a0<code>String<\/code>\u00a0.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-008e949 elementor-widget elementor-widget-text-editor\" data-id=\"008e949\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAnd if you\u2019ve gotten used to being able to throw every value you can think of\u2013\u2013from an\u00a0<code>int<\/code>\u00a0to a\u00a0<code>KitchenSink<\/code>\u2013\u2013into a list in Python, you\u2019ll find that working with Java arrays require a very different mindset. All elements in a Java array have to have the same data type, similar to an\u00a0<code>ndarray<\/code>\u00a0or a\u00a0<code>Series<\/code>\u00a0, but with careful design, you can get around this limitation with polymorphic references.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-2a1ab91 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2a1ab91\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7d98ab0\" data-id=\"7d98ab0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-ce85fee elementor-widget elementor-widget-image\" data-id=\"ce85fee\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img decoding=\"async\" width=\"576\" height=\"384\" src=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_eo5Mvo4tH72JFOuVUh3wBA.jpeg\" class=\"attachment-large size-large wp-image-33700\" alt=\"\" srcset=\"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_eo5Mvo4tH72JFOuVUh3wBA.jpeg 576w, https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/1_eo5Mvo4tH72JFOuVUh3wBA-300x200.jpeg 300w\" sizes=\"(max-width: 576px) 100vw, 576px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-80d4f4f elementor-widget elementor-widget-text-editor\" data-id=\"80d4f4f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAlthough this specificity can be annoying, it makes your code significantly more\u00a0<em>predictable<\/em>, which is my gold standard for readability. Blocks are grouped together with curly braces rather than indents, so you can easily tell where they start and end. While this isn\u2019t a huge issue on your computer, I\u2019ve found that grouping by indent in a printed Python book (where the code is split over multiple pages) can create problems for people new to that language.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ecbe32c elementor-widget elementor-widget-text-editor\" data-id=\"ecbe32c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAdditionally, this strictness means variable scope is significantly easier to wrap your head around in Java than it is in Python, and if you respect the curly braces, it often boils down to, \u201cDefined in the curly braces? Only exists in the curly braces.\u201d You actually have to put in work to declare\u00a0<code>global<\/code>\u00a0variables available to all class methods in Java, whereas in Python you might accidentally wind up using a syntactically valid (yet perfectly inappropriate) value from a completely different part of your program if you ever recycle a variable name. On top of that, you can actually have\u00a0<code>private<\/code>\u00a0fields in your class, instead of hoping everyone respects your underscored variable name.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6e3b930 elementor-widget elementor-widget-text-editor\" data-id=\"6e3b930\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tAnd if you ever make a mistake? Well, rather than letting your code run for 90% of its runtime then aborting when it encounters its first error\u2026\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-99a5c1e elementor-widget elementor-widget-heading\" data-id=\"99a5c1e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">4. Java is compiled, so many errors resulting from misunderstanding the previous points are caught before runtime.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3c3ce39 elementor-widget elementor-widget-text-editor\" data-id=\"3c3ce39\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tObviously, Python will parse your code before running it and generate a\u00a0<code>SyntaxError<\/code>\u00a0if it can\u2019t figure out what you\u2019re going for, but I\u2019m sure all of you (especially data scientists) have been annoyed at one point or another when your code screeches to a halt over a simple error, after accomplishing half of what you wanted it to do.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e7a1b48 elementor-widget elementor-widget-text-editor\" data-id=\"e7a1b48\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"98b6\">Oftentimes (in my experience, anyway), this happens because you\u2019ve attempted to perform some sort of an operation \u2014 say, calling a method \u2014 on an object of the wrong type. It\u2019s not a syntax error (you remembered the\u00a0<code>.<\/code>\u00a0!), so the parser doesn\u2019t catch it, and the traceback takes you down a rabbit hole into the core libraries, so you can see exactly what Python assumed you wanted to do with the mystery object you gave it.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e062547 elementor-widget elementor-widget-text-editor\" data-id=\"e062547\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tIn Java, this step happens\u00a0<em>before<\/em>\u00a0you run your code. Because you\u2019ve locked your variable into a specific data type when you declared it, the Java compiler can verify that every operation you attempt to perform on that object actually exists\u00a0<em>before<\/em>\u00a0runtime, and if the compiler detects an operation that isn\u2019t defined for that data type, your program will not compile and run at all.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fed120e elementor-widget elementor-widget-text-editor\" data-id=\"fed120e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\tThat\u2019s not to say that you\u2019ll never have your Java program terminate unexpectedly \u2014 there is a dynamic aspect to the language, so you\u2019ll become very good friends with<code>NullPointerException<\/code>\u00a0and\u00a0<code>ArrayIndexOutOfBoundsException<\/code>\u2013\u2013but this added layer of verification, combined with the strict and specific nature of Java, tends to funnel these runtime errors down predictable alleys.\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-11f4817 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"11f4817\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-bed3d68\" data-id=\"bed3d68\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-4820425 elementor-widget elementor-widget-heading\" data-id=\"4820425\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">5. Designing Java methods is almost nothing like designing Python functions, so you need to think about your problem differently.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3556373 elementor-widget elementor-widget-text-editor\" data-id=\"3556373\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"c84e\">A downside to this strictness is that Java method calls can become unruly pretty quickly. I absolutely love the functional side of Python, and have started relying not only on unordered keyword arguments, but also passing functions and having default values for optional parameters.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"748b\">This is totally valid Python code\u2026<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">def multiply(a, b, c=1):<br \/>    return a * b * cmultiply('hello', 3)<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-41987c7 elementor-widget elementor-widget-text-editor\" data-id=\"41987c7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"7b7d\">\u2026which would not fly in Java. Because Java is static-typed, you lock in the data type when you declare the variable. This means you have to pass values that have exactly that data type in exactly the same order as they appear in the method signature. While this reduces flexibility, it also reduces misuse of your code.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"e2cb\">While you can have methods with the same name handle different lists of parameters, Java handles this via\u00a0<em>overloading<\/em>, which requires you to write a different version of the method to handle each sequence of data types you want to support as a parameter list. Java checks the data types you passed, sees if there is a method defined for handling that sequence of data types, and calls that method\u2013\u2013methods with the same name and different parameters aren\u2019t really linked in any other way.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"2d4a\">And if you want to provide a default value for one of your parameters? You have to overload that method and drop the default-value parameter from the list.<\/p>\n<!-- \/wp:paragraph -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e64c452 elementor-widget elementor-widget-text-editor\" data-id=\"e64c452\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"b3df\">The fact that signatures are defined by the\u00a0<em>data types\u00a0<\/em>in the parameter list instead of the\u00a0<em>name<\/em>\u00a0of the variable also creates issues when you\u2019re used to thinking in Python. For example, if we wanted to provide default arguments for overloaded versions of this method:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">public static double getArea(double length, double width){<br \/>    return length * width;<br \/>}<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8507024 elementor-widget elementor-widget-text-editor\" data-id=\"8507024\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"c7fa\">We would run into an issue by including two versions with the same data types in their parameter list:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">public static double getArea(double length) {<br \/>    return length * 10;<br \/>}public static double getArea(double width) {<br \/>    return width * 5;<br \/>}<\/pre>\n<!-- \/wp:preformatted -->\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d78fb36 elementor-widget elementor-widget-text-editor\" data-id=\"d78fb36\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"8bb1\">Both of these methods are called\u00a0<code>getArea<\/code>\u00a0and both expect a\u00a0<code>double<\/code>\u00a0, so when you call\u00a0<code>getArea(12.3);<\/code>\u00a0, Java does not know which path to go down.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"8a97\">In addition to that, while Java does have some support for lambda expressions, they\u2019re\u00a0<a href=\"https:\/\/medium.com\/@johnmcclean\/lambdas-are-not-functional-programming-63533ce2eb74\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"broken_link\">a far cry from functional programming<\/a>, and attempting to think through a functional solution in an object-oriented language is begging for disaster.<\/p>\n<!-- \/wp:paragraph -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5947d41 elementor-widget elementor-widget-text-editor\" data-id=\"5947d41\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"f443\">Oh, and return types? Java limits you to one\u2013\u2013and you have to specify the data type when you write the method, which requires you to know what you want to return well in advance. You may be used to thinking about Python as being able to return multiple values\u2026<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">def get_stuff():<br \/>   return 1, 2, 3x, y, z = get_stuff()<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a0a1505 elementor-widget elementor-widget-text-editor\" data-id=\"a0a1505\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"335d\">\u2026but it actually returns a single object\u2013\u2013all of the values bundled into a tuple:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">&gt;&gt;&gt; type(get_stuff())<br \/>&lt;class 'tuple'&gt;<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ba664a8 elementor-widget elementor-widget-text-editor\" data-id=\"ba664a8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"2521\">You can be surprisingly productive in Python without ever knowing this fact, but in Java you\u00a0<em>always<\/em>\u00a0have to know what your methods are returning.<\/p>\n<!-- \/wp:paragraph -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8222f93 elementor-widget elementor-widget-heading\" data-id=\"8222f93\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">6. In addition to data types, Java requires you think about lower-level concepts like memory management.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-abe0c12 elementor-widget elementor-widget-text-editor\" data-id=\"abe0c12\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"1e4b\">This one might be a bit of a hot take (especially for people coming from a language like C that don\u2019t have automatic garbage collection), but there are certain pieces of Java that require you to think about what\u2019s going on, memory-wise. I\u2019m talking about reference variables!<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"fc6a\">For example, what happens when you try to run the following code in Python?<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">my_list = [1, 2, 3]<br \/>print(my_list)<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e280439 elementor-widget elementor-widget-text-editor\" data-id=\"e280439\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"6706\">If you\u2019re coming from a totally-Python background, you\u2019ll expect the following output:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">[1, 2, 3]<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a72ce1d elementor-widget elementor-widget-text-editor\" data-id=\"a72ce1d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"d1a2\">On the flip side, what do you get from the following Java code?<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">public class JavaFeatures {<br \/>    public static void main(String[] args) {<br \/>      int[] myList = {1, 2, 3};<br \/>      System.out.println(myList);<br \/>  }<br \/>}<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b755dde elementor-widget elementor-widget-text-editor\" data-id=\"b755dde\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"c04a\">That\u2019s right! It will print the memory address. Here\u2019s where my computer stored that:<code>[I@6d06d69c<\/code><\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"8ba0\">Again, Python makes the assumption that when you print a variable referencing a list, you want to see the list\u2019s\u00a0<em>contents<\/em>, while Java, by default, prints exactly what is stored in that reference variable: the location of the array in memory. To display the contents, you would need to loop through them:<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">for (int i = 0; i &lt; myList.length; i++) {<br \/>    System.out.println(myList[i]);<br \/>}<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_eae_slider elementor-section elementor-top-section elementor-element elementor-element-b8dfefd elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b8dfefd\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_eae_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-441f5d6\" data-id=\"441f5d6\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-a72b1ad elementor-widget elementor-widget-text-editor\" data-id=\"a72b1ad\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"c2f3\">While this takes a little bit of effort to wrap your brain around, it forces you to think about what\u2019s\u00a0<em>actually<\/em>\u00a0being passed when you throw around reference variables (the memory address of that object), which gives you a deeper understanding of how your computer is actually carrying out its tasks.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"ae0b\">While Java is not as low-level as other languages, it\u2019s much easier to make the leap from Java reference variables to C pointers than it is to leap from Python references, because you\u2019re used to encountering problems like the one above that force you to consider the memory address.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"a616\">But the lack of Python\u2019s \u201cset it and forget it\u201d mentality isn\u2019t limited to reference variables.<\/p>\n<!-- \/wp:paragraph -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d34a1fe elementor-widget elementor-widget-heading\" data-id=\"d34a1fe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">7. Java doesn\u2019t really have a great equivalent for&nbsp;&lt;code&gt;pip&lt;\/code&gt;&nbsp;or&nbsp;&lt;code&gt;conda&lt;\/code&gt;.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5efd145 elementor-widget elementor-widget-text-editor\" data-id=\"5efd145\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"4796\">When I think about what makes Python a useful language, I don\u2019t generally think about language features or syntax. I think about the Python\u00a0<em>ecosystem<\/em>. With a quick trip to the command line, you can use something like<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:preformatted -->\n<pre class=\"wp-block-preformatted\">pip install snazzy_new_library<\/pre>\n<!-- \/wp:preformatted -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4ac8e38 elementor-widget elementor-widget-text-editor\" data-id=\"4ac8e38\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"7940\">to download a\u00a0<code>snazzy_new_library<\/code>\u00a0for use whenever you need it.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"0397\">Although you will find people on message who will insist that package tools like\u00a0<code>maven<\/code>\u00a0or\u00a0<code>gradle<\/code>\u00a0are just as powerful as\u00a0<code>pip<\/code>\u00a0or\u00a0<code>conda<\/code>\u00a0, the reality is that while these tools are, indeed,\u00a0<em>powerful<\/em>, they aren\u2019t really\u00a0<em>equivalent.\u00a0<\/em>Java programs are generally structured differently\u2013\u2013rather than making a package globally available to any program in that environment, packages tend to be bundled directly with the application that needs them, and often need to be either added manually by dropping a jar file into the right place, or included with a tool that manages your dependences (which is what tools like<code>maven<\/code>\u00a0and\u00a0<code>gradle<\/code>\u00a0are\u00a0<em>actually<\/em>\u00a0great at).<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"38b4\">This can be inconvenient for Python programmers, because it requires you to jump through additional hoops to include a useful existing library on your project, and the size of the project files can get bloated as a result. On the other hand, bundling the included library with the project ensures that the necessary code is actually available when it\u2019s needed.<\/p>\n<!-- \/wp:paragraph -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7878d0d elementor-widget elementor-widget-heading\" data-id=\"7878d0d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion: You can learn Java, and it will make you a better programmer.<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c2c8f7e elementor-widget elementor-widget-text-editor\" data-id=\"c2c8f7e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<!-- wp:paragraph -->\n<p id=\"ece0\">Having to adapt your problem-solving skills to fit the quirks of a new programming language can be a scary task, but picking up a new language really does expand the arsenal of tools in your tool kit\u2013\u2013even in your first language. C pointers confused me until I got used to working with Java reference variables, and lambda expressions in Java baffled me until I saw how they were used in functional programming with Python\u2026 which in turn wraps back around to clarifying why we need function pointers in C.<\/p>\n<!-- \/wp:paragraph -->\n\n<!-- wp:paragraph -->\n<p id=\"4903\">Although it may seem daunting, just remember that many programmers before you have successfully learned Java, so it absolutely can be done.<\/p>\n<!-- \/wp:paragraph -->\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>You can learn Java, and it will make you a better programmer. Although it may seem daunting, just remember that many programmers before you have successfully learned Java, so it absolutely can be done.<\/p>\n","protected":false},"author":933,"featured_media":10114,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"content-type":"","footnotes":""},"categories":[187],"tags":[94,632,408,114],"ppma_author":[3887],"class_list":["post-10106","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bigdata-cloud","tag-data-science","tag-java","tag-programming","tag-python"],"authors":[{"term_id":3887,"user_id":933,"is_guest":0,"slug":"dan-hales","display_name":"Dan Hales","avatar_url":"https:\/\/www.experfy.com\/blog\/wp-content\/uploads\/2020\/10\/Dan-Hales.jpg","user_url":"","last_name":"Hales","first_name":"Dan","job_title":"","description":"Dan Hales is STEM Teacher at Foxcroft School, a college. He taught Java for a few years."}],"_links":{"self":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/users\/933"}],"replies":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/comments?post=10106"}],"version-history":[{"count":6,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10106\/revisions"}],"predecessor-version":[{"id":33703,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/posts\/10106\/revisions\/33703"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media\/10114"}],"wp:attachment":[{"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/media?parent=10106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/categories?post=10106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/tags?post=10106"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.experfy.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=10106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}