{"id":2089,"date":"2017-03-26T13:23:17","date_gmt":"2017-03-26T13:23:17","guid":{"rendered":"http:\/\/codethataint.com\/blog\/?p=2089"},"modified":"2017-03-26T13:23:17","modified_gmt":"2017-03-26T13:23:17","slug":"interface-extend-multiple-interfaces-in-java","status":"publish","type":"post","link":"https:\/\/codethataint.com\/blog\/interface-extend-multiple-interfaces-in-java\/","title":{"rendered":"Interface extend Multiple Interfaces in Java"},"content":{"rendered":"<p><strong>Yes<\/strong>. An interface can extend multiple interfaces, as shown here:<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ninterface Maininterface extends inter1, inter2, inter3{  \r\n  \/\/ methods\r\n}\r\n<\/pre>\n<p>A single class can also implement multiple interfaces<\/p>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\ninterface A\r\n{\r\n    void test();\r\n}\r\n\r\ninterface B \r\n{\r\n    void test();\r\n}\r\n\r\nclass C implements A, B\r\n{\r\n    @Override\r\n    public void test() {\r\n\r\n    }     \r\n}\r\n<\/pre>\n<p>Single implementation works for both. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yes. An interface can extend multiple interfaces, as shown here: interface Maininterface extends inter1, inter2, inter3{ \/\/ methods } A single class can also implement multiple interfaces interface A { void test(); } interface B { void test(); } class C implements A, B { @Override public void test() { } } Single implementation works&hellip; <a href=\"https:\/\/codethataint.com\/blog\/interface-extend-multiple-interfaces-in-java\/\">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":[98,193],"tags":[],"class_list":["post-2089","post","type-post","status-publish","format-standard","hentry","category-interface","category-interview-questions-java"],"_links":{"self":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2089","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=2089"}],"version-history":[{"count":1,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2089\/revisions"}],"predecessor-version":[{"id":2090,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/posts\/2089\/revisions\/2090"}],"wp:attachment":[{"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/media?parent=2089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/categories?post=2089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codethataint.com\/blog\/wp-json\/wp\/v2\/tags?post=2089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}