View Single Post
Old 06-21-2007, 08:18 PM   #3 (permalink)
Vormund
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default Re: Java import statement

Quote:
Originally Posted by jaeusm View Post
You use the 'static' keyword in an import statement when importing static methods. However, it is not good style to import methods only because your code becomes less readable. In this particular instance, you should remove all your import statements and explicitly call each static method using the type (or class, if you prefer that terminology) as shown below.
Code:
boolean x = Character.isUpperCase('A');
boolean y = Character.isLowerCase('b');
In that case, calling Character.method, Character would be a class and not a type.

But...I didn't know this: you can import static methods? That's funny. :laughing: But anyhow, he did that, didn't he?
__________________
Vormund is offline