Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
    Bookmark Topic Watch Topic
  • New Topic

why cannot use protected in this class definition?

 
Megan Lion
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
protected class Fred{
private int x=0;
private Fred(int xval){
x=xval;
}
}
why the modifier protected and private cannot used ,but public and default is ok?
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Report post to moderator
Megan, please do not post several times the same question.
I'm closing this thread now.
 
Lasagna is spaghetti flvored cake. Just like this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!