A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
why can't we declare a protected fields in interface?
Joined: Aug 01, 2012
Aug 01, 2012 22:46:53
Why can't we declare variables in interface as "PROTECTED".
Joined: Oct 13, 2005
Aug 02, 2012 03:52:28
Welcome to the Ranch
Because an interface is intended to create (part of) the public interface of a class. Everything in an interface is therefore implicitly public.
I agree. Here's the link:
subject: why can't we declare a protected fields in interface?
why we cann't make a class private and protected
Question About Access Specifier
static Methods @ Interface
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014