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

Why Integer class has Constructor

 
Haricharan Ramachandra
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have a question regarding Integer class, which is a Wrapper class,

I was going thru the API and found that Integer class is defined as public final class, so if it is final why dose it have a constructor, and how can we use that constructor if we can't instanciate the Integer class, as it is marked final according to the API.

please clarify.

~Hari
 
Haricharan Ramachandra
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry i got confused, final means it cant be extended but can be instanciated. so i got it resolved
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic