Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

non static variable

 
Saral Saxena
Ranch Hand
Posts: 203
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,

please guide non static variable cannot be refenced from static context..? please advise
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Saral Saxena wrote:Hi folks,

please guide non static variable cannot be refenced from static context..? please advise


Please SearchFirst.(⇐click) This is a very common question. In fact, you should always search the web before posting a question to a forum.

As I've told you before, sites like this one are not substitutes for doing your own research and spending time trying to figure things out on your own.
 
Zeeshan Sheikh
Ranch Hand
Posts: 144
Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please bookmark Java API & Oracle Tutorial your homepage. Trust me this will answer most of your questions.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49382
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you don’t understand the error message it is likely that you are not using the static context correctly. Please search the beginning Java™ forum and this forum for threads about static methods; there were two, about two weeks ago.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic