Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

is it mandatory to deaclare all variables public static
fianl in interfaces?if i declare like in the below program,
public interface A
{
public static final int I=0;
int j=0;
}
in interface A,what is the difference between I,j?

Answer Posted / sreedhar a

As per interface definition all the member variables by
default are public static final. There is no difference
between I and j variables. JVM will consider the j variable
as public static final int j=0;
Note: variables declared in interface must be initialized
otherwise program will fail to compile.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give us the name of the list layoutmanagers in java?

927


What is application tier?

1120


What is difference between fileinputstream and filereader in java?

1063


Is integer a class?

1077


explain the difference between jdk and jvm?

994


Does .length start 0 java?

1002


What is mean by encoding?

1076


Can you declare an interface method static?

1058


What do you understand by access specifiers in Java?

1012


Explain how can you debug the Java code?

1067


How does predicate work in java?

983


Why pointers are not used in java?

1125


Can we have multiple classes in single file ?

1066


Are generics important java?

974


Why we use multi threading instead of multiprocessing?

1063