Hi i want to know i can decalre a variable static within a function.Look at this code
String createPacketData()
{
static int seqnumber=1;
String data="Content Number";
String result=data+"="+seqnumber;
return (result);
}
Iam geting many errors when i try to declare a varible static within the Function
HERE IT IS:
illegal start of expression
static int seqnumber=1;
^
./CliSender.java:31: cannot resolve symbol
symbol : variable seqnumber
location: class CliSender
String result=data+"="+seqnumber;
please let meknow if it is illegal
thanks