Regards,<br />Sourin.
Originally posted by Sourin K. Sen:
Just think about it. What's the purpose of a static import ? To import the static members of a particular class.
When you write you are telling the compiler that you want to import all the static members of Integer class so that you can call them directly without having to write "Integer." infront of them.
But when you try to write you are actually telling the compiler to import a static top level class & if you remember, top level classes can never be static which means that you cannot ever import a top level class which is static. But by writing the preceding you are trying to do just that & hence the compiler wont allow you to do so.
Regards,
Sourin.
Regards,<br />Sourin.
SCBCD, SCJP & MCP
HowToAskQuestions
SCBCD, SCJP & MCP
HowToAskQuestions
Originally posted by Ankith suresh:
Hi thiagarajan
I am using jdk1.4
This tiny ad is wafer thin:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|