{"id":46,"date":"2022-11-23T20:35:25","date_gmt":"2022-11-23T20:35:25","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/ligan\/?p=46"},"modified":"2022-11-23T20:37:37","modified_gmt":"2022-11-23T20:37:37","slug":"bytelegend-walkthrough-part-iii","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/ligan\/2022\/11\/23\/bytelegend-walkthrough-part-iii\/","title":{"rendered":"ByteLegend Walkthrough Part III"},"content":{"rendered":"\n<p>Welcome to part 3 of this walkthrough!<\/p>\n\n\n\n<p>We have conquered Method and Field in Java Island in the last part.<\/p>\n\n\n\n<p>Now we are halfway to the end of Class and Object. Let\u2019s go!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Java Island (Class and Object)<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>(87 stars) NullPointerException Challenge 1. Hint: fix createNewCat(). Reading recommendation: <a href=\"https:\/\/stackoverflow.com\/questions\/218384\/what-is-a-nullpointerexception-and-how-do-i-fix-it\">https:\/\/stackoverflow.com\/questions\/218384\/what-is-a-nullpointerexception-and-how-do-i-fix-it<\/a>\u00a0<\/li>\n\n\n\n<li>(90 stars) NullPointerException Challenge 2. Hint: fix createNewCat().<\/li>\n\n\n\n<li>(93 stars) Reference and Value Challenge 1. Reading recommendation: <a href=\"https:\/\/www.geeksforgeeks.org\/reference-variable-in-java\/\">https:\/\/www.geeksforgeeks.org\/reference-variable-in-java\/<\/a>&nbsp;<\/li>\n\n\n\n<li>(96 stars) Reference and Value Challenge 2. Hint: check all three files to find the logic behind how values are passing via the references.&nbsp;<\/li>\n\n\n\n<li>(99 stars) Reference and Value Challenge 3. Time to learn deep copy: <a href=\"https:\/\/www.tutorialspoint.com\/what-is-deep-copy-explain-with-an-example-in-java\">https:\/\/www.tutorialspoint.com\/what-is-deep-copy-explain-with-an-example-in-java<\/a>&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>Congratulations! You have finished Class and Object. Let\u2019s keep exploring this island!<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Java Island (Data Structure)<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"6\">\n<li>(102 stars) Data Representation Challenge 1. Time to learn data types: <a href=\"https:\/\/www.w3schools.com\/java\/java_data_types.asp\">https:\/\/www.w3schools.com\/java\/java_data_types.asp<\/a>&nbsp;<\/li>\n<\/ol>\n\n\n\n<p>This is a sneaky question, don\u2019t waste too much time on it. Answer: <a href=\"https:\/\/github.com\/ByteLegendQuest\/java-data-type-max-value\/commit\/4b2a64ab955a86b647a149cd2f3049129813029d\">https:\/\/github.com\/ByteLegendQuest\/java-data-type-max-value\/commit\/4b2a64ab955a86b647a149cd2f3049129813029d<\/a>&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"7\">\n<li>(105 stars) Data Representation Challenge 2. Time to learn type casting\/conversion: <a href=\"https:\/\/www.w3schools.com\/java\/java_type_casting.asp\">https:\/\/www.w3schools.com\/java\/java_type_casting.asp<\/a> <a href=\"https:\/\/www.geeksforgeeks.org\/type-conversion-java-examples\/\">https:\/\/www.geeksforgeeks.org\/type-conversion-java-examples\/<\/a>&nbsp;<\/li>\n\n\n\n<li>(108 stars) Data Representation Challenge 3. To save you some time, try this precision: return Math.abs(a &#8211; b) &lt;= 1e-10;<\/li>\n<\/ol>\n\n\n\n<p>Reading Recommendations: <a href=\"https:\/\/www.baeldung.com\/java-comparing-doubles\">https:\/\/www.baeldung.com\/java-comparing-doubles<\/a> <a href=\"https:\/\/www.geeksforgeeks.org\/double-equals-method-in-java-with-examples\/\">https:\/\/www.geeksforgeeks.org\/double-equals-method-in-java-with-examples\/<\/a>&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"9\">\n<li>(111 stars) Type Conversion and Promotion Challenge 1. Hint: Revisit the readings in Data Representation Challenge 2.&nbsp;<\/li>\n\n\n\n<li>(114 stars) Type Conversion and Promotion Challenge 2. There are many different ways, methods, or functions to complete this task. Here is mine for your reference: <a href=\"https:\/\/github.com\/ByteLegendQuest\/java-implement-type-casts\/commit\/623ab1975148b10bdc59d2b0338368bfe0130d77\">https:\/\/github.com\/ByteLegendQuest\/java-implement-type-casts\/commit\/623ab1975148b10bdc59d2b0338368bfe0130d77<\/a>&nbsp;<\/li>\n\n\n\n<li>(117 stars) Autoboxing and Unboxing Challenge 1. Hint: add some statement in compare(). Reading Recommendation: <a href=\"https:\/\/www.tutorialspoint.com\/what-are-the-differences-between-an-integer-and-an-int-in-java\">https:\/\/www.tutorialspoint.com\/what-are-the-differences-between-an-integer-and-an-int-in-java<\/a>&nbsp;<\/li>\n\n\n\n<li>(120 stars) Autoboxing and Unboxing Challenge 2. Hint: Use Integer.parseInt(a) to change String a to integer; use String.valueOf(num) to change a number into String.<\/li>\n\n\n\n<li>(123 stars) Autoboxing and Unboxing Challenge 3. Hint and Reading Recommendation: <a href=\"https:\/\/www.baeldung.com\/java-integer-parseint-vs-valueof\">https:\/\/www.baeldung.com\/java-integer-parseint-vs-valueof<\/a>&nbsp;<\/li>\n\n\n\n<li>(126 stars) Java Array Challenge 1. Hint: Use array.length to check the length of the array.<\/li>\n\n\n\n<li>(129 stars) Java Array Challenge 2. Revisit the examples of parseInt and valueOf.<\/li>\n\n\n\n<li>(132 stars) Java Array Challenge 3. Hint and Reading Recommendations: <a href=\"https:\/\/www.geeksforgeeks.org\/arrays-copyof-in-java-with-examples\/\">https:\/\/www.geeksforgeeks.org\/arrays-copyof-in-java-with-examples\/<\/a>&nbsp;<\/li>\n<\/ol>\n\n\n\n<p><a href=\"https:\/\/www.geeksforgeeks.org\/system-arraycopy-in-java\/\">https:\/\/www.geeksforgeeks.org\/system-arraycopy-in-java\/<\/a><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Congratulations! We have finished Data Structure!<\/p>\n\n\n\n<p>This is the halfway point of this game. Java is not that hard, right?<\/p>\n\n\n\n<p>To be continued\u2026<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to part 3 of this walkthrough! We have conquered Method and Field in Java Island in the last part. Now we are halfway to the end of Class and Object. Let\u2019s go! Java Island (Class and Object) Congratulations! You have finished Class and Object. Let\u2019s keep exploring this island! Java Island (Data Structure) This &hellip; <a href=\"https:\/\/blogs.oregonstate.edu\/ligan\/2022\/11\/23\/bytelegend-walkthrough-part-iii\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">ByteLegend Walkthrough Part III<\/span><\/a><\/p>\n","protected":false},"author":12812,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-cs-life"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/users\/12812"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":2,"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":50,"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/posts\/46\/revisions\/50"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/ligan\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}