A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
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?
static Methods @ Interface
why we cann't make a class private and protected
Question About Access Specifier
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015