Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can i have static variable in static block?

 
sathiya moorthy
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
static { // static block
static int k=100;
}
can any one help me please?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you try to compile this, you will have your answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic