Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Static declaratoin problem?  RSS feed

 
marko markovic
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i could not declare a static variable in my JSp page. Why?
I tried : static int test = 0;
and get the following error:
Statement expected.
Could anyone tell me how can i declare a static variable?

$Regards
 
Wolfgang Stein
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the following:
<%!
final static String NL = System.getProperty("line.separator");
%>
It also works without the keyword 'final'.
Wolfgang Stein
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!