{"id":2675,"date":"2017-11-25T19:08:38","date_gmt":"2017-11-25T19:08:38","guid":{"rendered":"http:\/\/webartdevelopers.com\/?p=2675"},"modified":"2017-11-25T19:08:38","modified_gmt":"2017-11-25T19:08:38","slug":"how-to-create-an-interface-and-implement-it-in-core-java","status":"publish","type":"post","link":"https:\/\/webartdevelopers.com\/blog\/how-to-create-an-interface-and-implement-it-in-core-java\/","title":{"rendered":"How to Create an Interface and Implement it in Core Java"},"content":{"rendered":"<p>In this tutorial how to create a Interface and implement in Core Java\u00a0 is shown.<\/p>\n<p>Code:<\/p>\n<p>Interface.java<\/p>\n<p>interface Test<br \/>\n{<br \/>\nabstract public void disp();<br \/>\n}<\/p>\n<p>class A<br \/>\n{<br \/>\nint a=100;<br \/>\n}<\/p>\n<p>class Dummy extends A implements Test<br \/>\n{<br \/>\npublic void disp()<br \/>\n{<br \/>\nSystem.out.println(&#8220;Inside Interface&#8221;);<br \/>\n}<br \/>\n}<\/p>\n<p>class TestInterface<br \/>\n{<br \/>\npublic static void main(String args[])<br \/>\n{<br \/>\nDummy d=new Dummy();<br \/>\nd.disp();<br \/>\nSystem.out.println(&#8220;A: &#8220;+d.a);<br \/>\n}<br \/>\n}<\/p>\n<p><a href=\"https:\/\/youtu.be\/UQ9xWKlh-iI\">https:\/\/youtu.be\/UQ9xWKlh-iI<\/a><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"In this tutorial how to create a Interface and implement in Core Java\u00a0 is shown. Code: Interface.java interface Test { abstract public void disp(); } class A { int a=100; } class Dummy extends A implements Test { public void disp() { System.out.println(&#8220;Inside Interface&#8221;); } } class TestInterface { public static void main(String args) { Dummy d=new Dummy(); d.disp(); System.out.println(&#8220;A: &#8220;+d.a); } }<!-- AddThis Advanced Settings generic via filter on get_the_excerpt -->","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[156],"tags":[157,179,178,177],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/posts\/2675"}],"collection":[{"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/comments?post=2675"}],"version-history":[{"count":2,"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/posts\/2675\/revisions"}],"predecessor-version":[{"id":2677,"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/posts\/2675\/revisions\/2677"}],"wp:attachment":[{"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/media?parent=2675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/categories?post=2675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webartdevelopers.com\/blog\/wp-json\/wp\/v2\/tags?post=2675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}