illegal combination of modifiers: private and protected
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alan_Li
Posted On:   Tuesday, July 23, 2002 10:39 AM

I get the illegal combination of modifiers for my code and I'm not sure why...:

			
public class Blah {
private protected int i;
}


On the command line, I type to compile:

			
javac Blah.java


But I get the following error:
			
Blah.java:2: illegal combination of modifiers: private and protected
private protected int i;
^
1 error


I don't see why this is...any help would be appreciated.

Thanks.

Re: illegal combination of modifiers: private and protected

Posted By:   Benoit_Quintin  
Posted On:   Tuesday, July 23, 2002 10:42 AM

Simply because, as of JDK 1.1, you cannot have a private protected field, only private or protected...
About | Sitemap | Contact