Example & Tutorial understanding programming in easy ways.

Can we declare a enum within interface ?If Yes then give an example .How we can call enum ?

1. enum may be only private, protected, default, public ,static & abstract.

2. But as we are declare enum into interface so we can''t use abstract, private, protected with enum in within interface

public interface TestR4R {

//enum may be only private,protected,default,public ,static & abstract

//but as we are declare enum into interface so we can''t use abstract,private,protected

publicenum EnumR4R{r4r};

}

class Test implements TestR4R{

public EnumR4R a = EnumR4R.r4r;

}

Read More →
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!