Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Access private member  RSS feed

 
abalfazl hossein
Ranch Hand
Posts: 635
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - c has private access in extention.pkgsuper.StudentNumber
at extention.pkgsuper.ExtentionSuper.main


I did cast type. So what's the problem?
 
Jayesh A Lalwani
Rancher
Posts: 2762
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Private mean private. Private to everyone outside the class, including the main method
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abalfazl hossein wrote:

Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - c has private access in extention.pkgsuper.StudentNumber
at extention.pkgsuper.ExtentionSuper.main



Also, please read this... http://www.coderanch.com/how-to/java/FixAllCompilerErrorsBeforeRunningTheApplication

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!