• Post Reply Bookmark Topic Watch Topic
  • New Topic

static import feature  RSS feed

 
Nick Widelec
Ranch Hand
Posts: 226
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am aware that it's possible to do such a thing to avoid typing the full qualified name of the whole thing:



However I am wondering if there is a way to do the same only for 1 specified method for example like import static java.lang.Math.random();
Is it possible or it works only with the bulk operation?

Thanks in advance.



 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,

 
M Shareef
Greenhorn
Posts: 6
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes It is possible you can use.

import static java.lang.Math.random;

for reference you can go through below link.

http://docs.oracle.com/javase/1.5.0/docs/guide/language/static-import.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!