{"id":1793,"date":"2016-09-27T09:03:00","date_gmt":"2016-09-27T09:03:00","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=1793"},"modified":"2016-09-27T10:31:43","modified_gmt":"2016-09-27T10:31:43","slug":"length-vs-length","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/length-vs-length\/","title":{"rendered":"length vs length()"},"content":{"rendered":"<p><strong>length<\/strong> &#8211; arrays (int[], double[], String[]) &#8212;- to know the length of the arrays.<\/p>\n<p><strong>length()<\/strong> &#8211; String related Object (String, StringBuilder etc)to know the length of the String<\/p>\n<p><strong>size()<\/strong>&#8211; Collection Object (ArrayList, Set etc)to know the size of the Collection <\/p>\n<p>length is not a method, so it completely makes sense that it will not work on objects. Its only works on arrays.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>length &#8211; arrays (int[], double[], String[]) &#8212;- to know the length of the arrays. length() &#8211; String related Object (String, StringBuilder etc)to know the length of the String size()&#8211; Collection Object (ArrayList, Set etc)to know the size of the Collection length is not a method, so it completely makes sense that it will not work&hellip; <a href=\"https:\/\/codethataint.com\/blog\/length-vs-length\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[193],"tags":[],"class_list":["post-1793","post","type-post","status-publish","format-standard","hentry","category-interview-questions-java"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/comments?post=1793"}],"version-history":[{"count":2,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1793\/revisions"}],"predecessor-version":[{"id":1795,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/1793\/revisions\/1795"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=1793"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=1793"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=1793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}