{"id":80880,"date":"2019-11-20T11:00:57","date_gmt":"2019-11-20T09:00:57","guid":{"rendered":"http:\/\/examples.javacodegeeks.com\/?p=80880"},"modified":"2021-09-20T12:48:18","modified_gmt":"2021-09-20T09:48:18","slug":"java-node-example","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/java-node-example\/","title":{"rendered":"Java Node Example"},"content":{"rendered":"<p>In this article, we will discuss a simple Java Node class through examples.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-1-what-is-a-node\">1. What is a Node<\/h2>\n<p>An Individual Node in java is a class that is used to create the individual data holding blocks for various data structures, which organize data in a nonsequential fashion.<\/p>\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full\"><a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\"><img decoding=\"async\" width=\"150\" height=\"150\" src=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\" alt=\"Java Node\" class=\"wp-image-1204\" srcset=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg 150w, https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo-70x70.jpg 70w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><\/figure>\n<\/div>\n<h2 class=\"wp-block-heading\" id=\"h-2-implementations-of-node-class\">2. Implementations of Node class<\/h2>\n<p>A Node class can be customized to store one or more data fields and pointer links inside each of the individual objects, depending on the needs of the required data structure.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-1-node-class-in-linked-list\">2.1 Node class in Linked List<\/h3>\n<p>In this section, we will discuss the node class used in defining a Singly Linked List.<\/p>\n<p>In the Case of Singly Linked List, the Node class usually contains 2 values,<\/p>\n<ol class=\"wp-block-list\">\n<li>Data Field, which contains the data stored in the current Node.<\/li>\n<li>Pointer Field of type Node, which contains the address information of the next Node in the Linked List.<\/li>\n<\/ol>\n<p>The following code snippet will show the structure of the Node Class in the Singly Linked List.<\/p>\n<p><span style=\"text-decoration: underline\"><em>SinglyLinkedListNode.java<\/em><\/span><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\npublic class SinglyLinkedListNode {\n    protected int data;\n    protected SinglyLinkedListNode next;\n\n    public SinglyLinkedListNode() {\n        next = null;\n        data = 0;\n    }\n\n    public SinglyLinkedListNode(int d, SinglyLinkedListNode n) {\n        data = d;\n        next = n;\n    }\n\n    public void setLinkNext(SinglyLinkedListNode n) {\n        next = n;\n    }\n\n\n    public SinglyLinkedListNode getLinkNext() {\n        return next;\n    }\n\n\n    public void setData(int d) {\n        data = d;\n    }\n\n    public int getData() {\n        return data;\n    }\n}\n<\/pre>\n<\/div>\n<p>In the above code snippet, the <code>next<\/code> is the pointer to the next node in the Singly Linked List and <code>data<\/code> is the value stored in the current node of Singly Linked List. <\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-2-node-class-in-doubly-linked-list-and-binary-tree\">2.2 Node class in Doubly Linked List and Binary Tree<\/h3>\n<p>In this section we will discuss the node class used in defining a Doubly Linked List and Binary tree.<\/p>\n<p>In case of Both DLL and Binary Tree, the Node class contains 3 values.<\/p>\n<p>For Doubly Linked List, Node class usually have 3 values,<\/p>\n<ol class=\"wp-block-list\">\n<li>Data Field, which contains the data stored in the current Node.<\/li>\n<li>Next Pointer Field of type Node, which contains the address information of the next Node in the Linked List.<\/li>\n<li>Prev Pointer Field of type Node, which contains the address information of the previous Node in the Linked List.<\/li>\n<\/ol>\n<p>Following Code snippet will show the structure of the Node Class in Doubly Linked List. <\/p>\n<p><span style=\"text-decoration: underline\"><em>DoublyLinkedListNode.java<\/em><\/span><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\npublic class DoublyLinkedListNode {\n    protected int data;\n    protected DoublyLinkedListNode next, prev;\n\n    public DoublyLinkedListNode() {\n        next = null;\n        prev = null;\n        data = 0;\n    }\n\n    public DoublyLinkedListNode(int d, DoublyLinkedListNode n, DoublyLinkedListNode p) {\n        data = d;\n        next = n;\n        prev = p;\n    }\n\n    public void setLinkNext(DoublyLinkedListNode n) {\n        next = n;\n    }\n\n    public void setLinkPrev(DoublyLinkedListNode p) {\n        prev = p;\n    }\n\n    public DoublyLinkedListNode getLinkNext() {\n        return next;\n    }\n\n    public DoublyLinkedListNode getLinkPrev() {\n        return prev;\n    }\n\n    public void setData(int d) {\n        data = d;\n    }\n\n    public int getData() {\n        return data;\n    }\n}\n<\/pre>\n<\/div>\n<p>In the above code snippet, the next is the pointer to the next node and prev is the pointer to the previous node in the Doubly Linked List and <code>data<\/code> is the value stored in the current node of Doubly Linked List. <div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>For Binary tree, Node class usually have 3 values,<\/p>\n<ol class=\"wp-block-list\">\n<li>Data Field, which contains the data stored in the current Node.<\/li>\n<li>Left Pointer Field of type Node, which contains the address information of the root Node of  Left Subtree in Binary Tree or null for leaf pointer.<\/li>\n<li>Right Pointer Field of type Node, which contains the address information of the root Node of  Right Subtree in Binary Tree or null for leaf pointer.<\/li>\n<\/ol>\n<p>The following Code snippet will show the structure of the Node Class in Binary Tree.<\/p>\n<p><span style=\"text-decoration: underline\"><em>BinaryTreeNode.java<\/em><\/span><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\nclass BinaryTreeNode {\n    int value;\n    BinaryTreeNode left;\n\n    public int getValue() {\n        return value;\n    }\n\n    public void setValue(int value) {\n        this.value = value;\n    }\n\n    public BinaryTreeNode getLeft() {\n        return left;\n    }\n\n    public void setLeft(BinaryTreeNode left) {\n        this.left = left;\n    }\n\n    public BinaryTreeNode getRight() {\n        return right;\n    }\n\n    public void setRight(BinaryTreeNode right) {\n        this.right = right;\n    }\n\n    BinaryTreeNode right;\n\n    BinaryTreeNode(int value) {\n        this.value = value;\n        right = null;\n        left = null;\n    }\n}\n<\/pre>\n<\/div>\n<p>In the above code snippet, the <code>right<\/code> is the pointer to the root of the right subtree node and <code>left <\/code> is the pointer to the root of the left subtree of the Binary Tree and <code>value<\/code> is the value stored in the current node of the Binary Tree.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-3-node-class-in-n-ary-tree-and-trie\">2.3 Node class in N-Ary Tree and Trie<\/h3>\n<p>In this section, we will discuss the node class used in defining an N-ary tree and Trie.<\/p>\n<p>In the Case of the N-ary tree and Trie, the Node class usually contains 2 values,<\/p>\n<ol class=\"wp-block-list\">\n<li>Data Field, which contains the data stored in the current Node.<\/li>\n<li>Pointer Field, which is an array of items of type Node, where each item contains the address information of the next Node in the Linked List.<\/li>\n<\/ol>\n<p>The following Code snippet will show the structure of the Node Class in N-ary Tree and Trie Linked List.<\/p>\n<p><span style=\"text-decoration: underline\"><em>NaryTreeNode.java<\/em><\/span><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class NaryTreeNode {\n\n    public NaryTreeNode parentNode; \/\/ The parent of the current node\n    public List&lt;NaryTreeNode&gt; childList; \/\/ The children&#039;s of the current node\n    public String dataValue;\n\n    public NaryTreeNode getParentNode() {\n        return parentNode;\n    }\n\n    public void setParentNode(NaryTreeNode parentNode) {\n        this.parentNode = parentNode;\n    }\n\n    public List&lt;NaryTreeNode&gt; getChildList() {\n        return childList;\n    }\n\n    public void setChildList(List&lt;NaryTreeNode&gt; childList) {\n        this.childList = childList;\n    }\n\n    public String getDataValue() {\n        return dataValue;\n    }\n\n    public void String(String dataValue) {\n        this.dataValue = dataValue;\n    }\n\n    public static int getMaxNumberOfChildren() {\n        return maxNumberOfChildren;\n    }\n\n    public static void setMaxNumberOfChildren(int maxNumberOfChildren) {\n        NaryTreeNode.maxNumberOfChildren = maxNumberOfChildren;\n    }\n\n    public static int maxNumberOfChildren; \/\/ Equal to the n-arity;\n\n    public NaryTreeNode(String dataValue) {\n        this.dataValue = dataValue;\n        childList = new ArrayList&lt;NaryTreeNode&gt;(maxNumberOfChildren);\n    }\n\n    public void addChild(NaryTreeNode childNaryTreeNode, int position) throws Exception {\n        if (position &gt;= maxNumberOfChildren - 1) {\n            throw new Exception(&quot;Max number of childeren reached&quot;);\n        } else {\n            System.out.println(&quot;this.children=&quot; + this.childList);\n            if (this.childList.get(position) != null) {\n                \/\/ There is already a child node on this position; throw some error;\n            } else {\n                childNaryTreeNode.parentNode = this;\n                this.childList.set(position, childNaryTreeNode);\n            }\n        }\n    }\n}\n<\/pre>\n<\/div>\n<p>In the above code snippet, the parentNode stores the parent information of the current node, childList stores the list of all the children of the current node and <code>dataValue<\/code> stores the information stored in the current node.<\/p>\n<p><span style=\"text-decoration: underline\"><em>TrieNode.java<\/em><\/span><\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\npublic class TrieNode {\n    final int ALPHABET_SIZE = 26;\n    TrieNode&#x5B;] trieChildList = new TrieNode&#x5B;ALPHABET_SIZE];\n\n    boolean isEndOfWord; \/\/ used in implementation of Prefix Search, signifies the end of word.\n\n    public TrieNode&#x5B;] getTrieChildList() {\n        return trieChildList;\n    }\n\n    public void setTrieChildList(TrieNode&#x5B;] trieChildList) {\n        this.trieChildList = trieChildList;\n    }\n\n    public boolean isEndOfWord() {\n        return isEndOfWord;\n    }\n\n    public void setEndOfWord(boolean endOfWord) {\n        isEndOfWord = endOfWord;\n    }\n\n    TrieNode() {\n        isEndOfWord = false;\n        for (int i = 0; i &lt; ALPHABET_SIZE; i++)\n            trieChildList&#x5B;i] = null;\n    }\n}\n\n<\/pre>\n<\/div>\n<p>In the above code snippet, the <code>trieChildList<\/code> is the list of all the child nodes of the current node in Trie.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-4-applications-of-node-class\">4. Applications of Node class<\/h2>\n<p>During the course of this article, we have seen various use-case featuring the Node class. Java Node class is actually being used as a generic name for any object template which is used in a building block for any non-sequential Data structure.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-5-more-articles\">5. More articles<\/h2>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/arraylist-java-example\/\">ArrayList Java Example \u2013 How to use ArrayList (with video)<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/hashmap-java-example\/\">Hashmap Java Example (with video)<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/java-array-example\/\">Java Array \u2013 java.util.Arrays Example (with Video)<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/java-list-example\/\">Java List Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/java-map-example\/\">Java Map Example<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/java-queue-example\/\">Java Queue Example (with video)<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/java-stack-example\/\">Java Stack Example (with video)<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/java-set-example\/\">Java Set Example (with video)<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/linkedlist-java-example\/\">LinkedList Java Example (with video)<\/a><\/li>\n<li><a href=\"https:\/\/examples.javacodegeeks.com\/hashset-java-example\/\">Hashset Java Example<\/a><\/li>\n<\/ul>\n<h2 class=\"wp-block-heading\" id=\"h-6-download-the-source-code\">6. Download the source code<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here: <a href=\"http:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2019\/11\/JavaNodeExample.zip\"><strong>Java Node Example<\/strong><\/a><\/div>\n<p><strong>Last updated on Aug. 11th, 2021<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will discuss a simple Java Node class through examples. 1. What is a Node An Individual Node in java is a class that is used to create the individual data holding blocks for various data structures, which organize data in a nonsequential fashion. 2. Implementations of Node class A Node class &hellip;<\/p>\n","protected":false},"author":185,"featured_media":1204,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-80880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Java Node Example - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"A Node class can be customized to store one or more data fields &amp; pointer links inside each of the individual objects.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/java-node-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Java Node Example - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"A Node class can be customized to store one or more data fields &amp; pointer links inside each of the individual objects.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/java-node-example\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ang1989\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-20T09:00:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-20T09:48:18+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/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=\"Abhinav Nath Gupta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@abhiit89\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhinav Nath Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/\"},\"author\":{\"name\":\"Abhinav Nath Gupta\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b7184a4af6c089e20a78d852b31f3cd3\"},\"headline\":\"Java Node Example\",\"datePublished\":\"2019-11-20T09:00:57+00:00\",\"dateModified\":\"2021-09-20T09:48:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/\"},\"wordCount\":765,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"articleSection\":[\"Core Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/\",\"name\":\"Java Node Example - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"datePublished\":\"2019-11-20T09:00:57+00:00\",\"dateModified\":\"2021-09-20T09:48:18+00:00\",\"description\":\"A Node class can be customized to store one or more data fields & pointer links inside each of the individual objects.\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/java-node-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"Bipartite Graph\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/java-node-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Java Node Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b7184a4af6c089e20a78d852b31f3cd3\",\"name\":\"Abhinav Nath Gupta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6b3345fff21b7b5e75867ede01e0db109dd33d3fe0443f6e0a32be030bd0be14?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6b3345fff21b7b5e75867ede01e0db109dd33d3fe0443f6e0a32be030bd0be14?s=96&d=mm&r=g\",\"caption\":\"Abhinav Nath Gupta\"},\"description\":\"Abhinav holds a Master degree in Computer Science and Engineering from the National Institute of Technology Karnataka. He has finished his graduation from Information Technology Department in the Anand Engineering College, Agra. During his studies he has been involved with a large number of projects ranging from Networking and Cryptography. He works as a software development engineer at a software development firm in bengaluru where he is mainly involved with projects based on Nodejs. He is interested in cryptography, data security, cryptocurrency and cloud computing, and published articles regarding these topics. He can be reached at abhi.aec89@gmail.com.\",\"sameAs\":[\"https:\/\/www.facebook.com\/ang1989\",\"https:\/\/in.linkedin.com\/in\/abhinav-gupta-2aab7113\",\"https:\/\/x.com\/abhiit89\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/abhinav_nath-gupta\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Java Node Example - Java Code Geeks","description":"A Node class can be customized to store one or more data fields & pointer links inside each of the individual objects.","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:\/\/examples.javacodegeeks.com\/java-node-example\/","og_locale":"en_US","og_type":"article","og_title":"Java Node Example - Java Code Geeks","og_description":"A Node class can be customized to store one or more data fields & pointer links inside each of the individual objects.","og_url":"https:\/\/examples.javacodegeeks.com\/java-node-example\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/ang1989","article_published_time":"2019-11-20T09:00:57+00:00","article_modified_time":"2021-09-20T09:48:18+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","type":"image\/jpeg"}],"author":"Abhinav Nath Gupta","twitter_card":"summary_large_image","twitter_creator":"@abhiit89","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Abhinav Nath Gupta","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/"},"author":{"name":"Abhinav Nath Gupta","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b7184a4af6c089e20a78d852b31f3cd3"},"headline":"Java Node Example","datePublished":"2019-11-20T09:00:57+00:00","dateModified":"2021-09-20T09:48:18+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/"},"wordCount":765,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","articleSection":["Core Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/java-node-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/","url":"https:\/\/examples.javacodegeeks.com\/java-node-example\/","name":"Java Node Example - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","datePublished":"2019-11-20T09:00:57+00:00","dateModified":"2021-09-20T09:48:18+00:00","description":"A Node class can be customized to store one or more data fields & pointer links inside each of the individual objects.","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/java-node-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2012\/12\/java-logo.jpg","width":150,"height":150,"caption":"Bipartite Graph"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/java-node-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java Development","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/examples.javacodegeeks.com\/category\/java-development\/core-java\/"},{"@type":"ListItem","position":4,"name":"Java Node Example"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/b7184a4af6c089e20a78d852b31f3cd3","name":"Abhinav Nath Gupta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6b3345fff21b7b5e75867ede01e0db109dd33d3fe0443f6e0a32be030bd0be14?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6b3345fff21b7b5e75867ede01e0db109dd33d3fe0443f6e0a32be030bd0be14?s=96&d=mm&r=g","caption":"Abhinav Nath Gupta"},"description":"Abhinav holds a Master degree in Computer Science and Engineering from the National Institute of Technology Karnataka. He has finished his graduation from Information Technology Department in the Anand Engineering College, Agra. During his studies he has been involved with a large number of projects ranging from Networking and Cryptography. He works as a software development engineer at a software development firm in bengaluru where he is mainly involved with projects based on Nodejs. He is interested in cryptography, data security, cryptocurrency and cloud computing, and published articles regarding these topics. He can be reached at abhi.aec89@gmail.com.","sameAs":["https:\/\/www.facebook.com\/ang1989","https:\/\/in.linkedin.com\/in\/abhinav-gupta-2aab7113","https:\/\/x.com\/abhiit89"],"url":"https:\/\/examples.javacodegeeks.com\/author\/abhinav_nath-gupta\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/80880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/185"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=80880"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/80880\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/1204"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=80880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=80880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=80880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}