posted 21 years ago
Hi,
In Khalid Mughal's book question no. 4.26 on the page 130 goes like this:
Which of these are not legal declarations within a class?
Select all valid answers.
(a) static int a ;
(b) final Object[] fudge = { null } ;
(c) abstract int t ;
(d) native void sneeze() ;
(e) final transient static private double PI = 3.14159265358979323846 ;
The correct answer given in the book is c.
c is illegal, alright. But isn't e also illegal?
In that book itself it mensioned that,
Note that the transient modifier cannot be specified for static variables, as do not belong
to objects.
Here, PI is a static variable then how can it be transient?
Always say the TRUTH only