Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Constructors

 
Puja S
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There was this question :

Q23 Which of the following modifiers are allowed in constructor?
A1 private
A2 default
A3 public
A4 static

The answer was A1 and A3......Why not A2 also ?

Thanks.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
default is not a modifier . it is just a access specifier or access level .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic