I have a problem with final
Hi friends,
I am new to this forum.
I am learning java now.
I have a problem in defining a constant using final .please help me.
Code:
class Testconst
{
public static void main(String args[])
{
static final double PI = 3.141592653589793;
System.out.println("pi="+pi);
//........
//.......
}
}
when i compiled this,i got an error like this
illegal start of expression
static final double PI = 3.141592653589793;
Is there any mistake in my code ?
please tell me.
Thank u very much.