{"id":22542,"date":"2014-03-10T19:00:20","date_gmt":"2014-03-10T17:00:20","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=22542"},"modified":"2014-03-10T08:58:41","modified_gmt":"2014-03-10T06:58:41","slug":"whats-new-in-java-8-date-api","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html","title":{"rendered":"What&#8217;s new in Java 8 &#8211; Date API"},"content":{"rendered":"<p>With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new <a href=\"http:\/\/download.java.net\/jdk8\/docs\/api\/java\/time\/package-summary.html\" target=\"_blank\">Date<\/a> API, a result of the work on <a href=\"https:\/\/jcp.org\/en\/jsr\/detail?id=310\" target=\"_blank\">JSR 310<\/a>. While Lambda expressions are certainly the big draw of Java 8, having a better way to work with dates is a decidedly welcome addition. This is a quick post (part 1 of 2 or 3) showing some highlights of the new Date functionality, this time mostly around the <a href=\"http:\/\/download.java.net\/jdk8\/docs\/api\/java\/time\/LocalDate.html\" target=\"_blank\">LocalDate<\/a> class.<\/p>\n<h2>Creating New Date Objects<\/h2>\n<p>Creating a new Date object representing a specific day is as easy as:<br \/>\n&nbsp;<\/p>\n<pre class=\" brush:bash\">LocalDate today = LocalDate.parse(\"2014-02-27\");\r\n\/\/or this method\r\nLocalDate bday = LocalDate.of(2014,3,18);<\/pre>\n<h2>Adding To Dates<\/h2>\n<p>As an example of the ease with which we can work with dates in Java 8, consider the case where we need to add either days, months or years to an existing date. There are the methods <code>LocalDate.plusDays<\/code>,<code>LocalDate.plusWeeks<\/code>, <code>LocalDate.plusMonths<\/code> <code>LocalDate.plusYears<\/code>. There is also a generic <code>LocalDate.plus<\/code> method where you specify how much to add and the time unit via a <a href=\"http:\/\/download.java.net\/jdk8\/docs\/api\/java\/time\/temporal\/TemporalUnit.html\" target=\"_blank\">TemporalUnit<\/a> type. Here some examples:<\/p>\n<pre class=\" brush:java\">@Test\r\n\tpublic void test_add_to_date() {\r\n\t \r\n\t    LocalDate oneMonthFromNow = today.plusDays(30);\r\n\t    assertTrue(oneMonthFromNow.isEqual(LocalDate.parse(\"2014-03-29\")));\r\n\t \r\n\t    LocalDate nextMonth = today.plusMonths(1);\r\n\t    assertTrue(nextMonth.isEqual(LocalDate.parse(\"2014-03-27\")));\r\n\t \r\n\t    LocalDate future = today.plus(4, ChronoUnit.WEEKS);\r\n\t    assertTrue(future.isEqual(LocalDate.parse(\"2014-03-27\")));\r\n\t \r\n\t}<\/pre>\n<h2>Subtracting From Dates<\/h2>\n<p>To subtract days, weeks, months or years from a date there the expected methods: <code>LocalDate.minusDays<\/code>, <code>LocalDate.minusMonths<\/code> etc. Here\u2019s some examples of subtracting from a date:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\" brush:java\">@Test\r\n    public void test_subtract_from_date() {\r\n\r\n        assertThat(today.minusWeeks(1).toString(), is(\"2014-02-20\"));\r\n\r\n        assertThat(today.minusMonths(2).toString(), is(\"2013-12-27\"));\r\n\r\n        assertThat(today.minusYears(4).toString(), is(\"2010-02-27\"));\r\n\r\n        Period twoMonths = Period.ofMonths(2);\r\n\r\n        assertThat(today.minus(twoMonths).toString(), is(\"2013-12-27\"));\r\n\r\n    }<\/pre>\n<p>In this example we also introduced the <a href=\"http:\/\/download.java.net\/jdk8\/docs\/api\/java\/time\/Period.html\" target=\"_blank\">Period<\/a> object.<\/p>\n<h2>Determining Difference Between Dates<\/h2>\n<p>It could be argued getting the difference between two dates was the most painful operation to do with dates prior to Java 8. The new Date API makes determining the amount of days,weeks,months or years between dates equally as easy with the <code>LocalDate.until<\/code> method:<\/p>\n<pre class=\" brush:java\">@Test\r\n    public void test_get_days_between_dates() {\r\n        LocalDate vacationStart = LocalDate.parse(\"2014-07-04\");\r\n        Period timeUntilVacation = today.until(vacationStart);\r\n\r\n        assertThat(timeUntilVacation.getMonths(), is(4));\r\n\r\n        assertThat(timeUntilVacation.getDays(), is(7));\r\n\r\n        assertThat(today.until(vacationStart, ChronoUnit.DAYS), is(127L));\r\n\r\n        LocalDate libraryBookDue = LocalDate.parse(\"2000-03-18\");\r\n\r\n        assertThat(today.until(libraryBookDue).isNegative(), is(true));\r\n\r\n        assertThat(today.until(libraryBookDue, ChronoUnit.DAYS), is(-5094L));\r\n\r\n        LocalDate christmas = LocalDate.parse(\"2014-12-25\");\r\n        assertThat(today.until(christmas, ChronoUnit.DAYS), is(301L));\r\n\r\n    }<\/pre>\n<p>In this example we see the use of the <code>Period<\/code> object again.<\/p>\n<h2>Conclusion<\/h2>\n<p>We\u2019ve wrapped up our quick tour of the <code>LocalDate<\/code> and the Java 8 Date API. Obviously, there is so much more to discover about working with dates and time in Java 8, this post is just a quick introduction. Thanks for your time.<\/p>\n<h2>Resources<\/h2>\n<ul>\n<li><a href=\"http:\/\/www.joda.org\/joda-time\/\" target=\"_blank\">Joda Time<\/a> a Java date-time library to use for Java versions &lt; 8<\/li>\n<li>The <a href=\"http:\/\/download.java.net\/jdk8\/docs\/api\/java\/time\/package-summary.html\" target=\"_blank\">java.time<\/a> package contains the java doc for the classes discussed in this post.<\/li>\n<li><a href=\"http:\/\/pragprog.com\/book\/vsjava8\/functional-programming-in-java\" target=\"_blank\">Functional Programming in Java 8<\/a> a great resource on using the new functional components in Java 8<\/li>\n<li><a href=\"https:\/\/github.com\/bbejeck\/Java-8\/blob\/master\/test\/bbejeck\/dates\/LocalDateTest.java\" target=\"_blank\">Source code<\/a> for this post<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/codingjunkie.net\/java-8-dates-part1\/\">What&#8217;s new in Java 8 &#8211; Date API<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Bill Bejeck at the <a href=\"http:\/\/codingjunkie.net\/\">Random Thoughts On Coding<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new Date API, a result of the work on JSR 310. While Lambda expressions are certainly the big draw of Java 8, having a better way to work with dates is a decidedly welcome addition. &hellip;<\/p>\n","protected":false},"author":110,"featured_media":148,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[196],"class_list":["post-22542","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-java","tag-java-8"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>What&#039;s new in Java 8 - Date API<\/title>\n<meta name=\"description\" content=\"With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new Date API, a result of the work on JSR 310. While\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What&#039;s new in Java 8 - Date API\" \/>\n<meta property=\"og:description\" content=\"With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new Date API, a result of the work on JSR 310. While\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-10T17:00:20+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Bill Bejeck\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bill Bejeck\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html\"},\"author\":{\"name\":\"Bill Bejeck\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/69f9f11896bf9cfd7278b440efeda646\"},\"headline\":\"What&#8217;s new in Java 8 &#8211; Date API\",\"datePublished\":\"2014-03-10T17:00:20+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html\"},\"wordCount\":373,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"keywords\":[\"Java 8\"],\"articleSection\":[\"Core Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html\",\"name\":\"What's new in Java 8 - Date API\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"datePublished\":\"2014-03-10T17:00:20+00:00\",\"description\":\"With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new Date API, a result of the work on JSR 310. While\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2014\\\/03\\\/whats-new-in-java-8-date-api.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/core-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"What&#8217;s new in Java 8 &#8211; Date API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/69f9f11896bf9cfd7278b440efeda646\",\"name\":\"Bill Bejeck\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0ab8cd639470515ff498599471cc60f21b2d0b14301ff22cadc708dc19c8be?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0ab8cd639470515ff498599471cc60f21b2d0b14301ff22cadc708dc19c8be?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6f0ab8cd639470515ff498599471cc60f21b2d0b14301ff22cadc708dc19c8be?s=96&d=mm&r=g\",\"caption\":\"Bill Bejeck\"},\"description\":\"Husband, father of 3, passionate about software development.\",\"sameAs\":[\"http:\\\/\\\/codingjunkie.net\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Bill-Bejeck\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What's new in Java 8 - Date API","description":"With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new Date API, a result of the work on JSR 310. While","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:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html","og_locale":"en_US","og_type":"article","og_title":"What's new in Java 8 - Date API","og_description":"With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new Date API, a result of the work on JSR 310. While","og_url":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2014-03-10T17:00:20+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","type":"image\/jpeg"}],"author":"Bill Bejeck","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Bill Bejeck","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html"},"author":{"name":"Bill Bejeck","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/69f9f11896bf9cfd7278b440efeda646"},"headline":"What&#8217;s new in Java 8 &#8211; Date API","datePublished":"2014-03-10T17:00:20+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html"},"wordCount":373,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","keywords":["Java 8"],"articleSection":["Core Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html","url":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html","name":"What's new in Java 8 - Date API","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","datePublished":"2014-03-10T17:00:20+00:00","description":"With the final release of Java 8 around the corner, one of the new features I\u2019m excited about is the new Date API, a result of the work on JSR 310. While","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2014\/03\/whats-new-in-java-8-date-api.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/core-java"},{"@type":"ListItem","position":4,"name":"What&#8217;s new in Java 8 &#8211; Date API"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/69f9f11896bf9cfd7278b440efeda646","name":"Bill Bejeck","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6f0ab8cd639470515ff498599471cc60f21b2d0b14301ff22cadc708dc19c8be?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6f0ab8cd639470515ff498599471cc60f21b2d0b14301ff22cadc708dc19c8be?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6f0ab8cd639470515ff498599471cc60f21b2d0b14301ff22cadc708dc19c8be?s=96&d=mm&r=g","caption":"Bill Bejeck"},"description":"Husband, father of 3, passionate about software development.","sameAs":["http:\/\/codingjunkie.net\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Bill-Bejeck"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/22542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/110"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=22542"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/22542\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/148"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=22542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=22542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=22542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}