Thread: Static fields
View Single Post
  #22 (permalink)  
Old 05-09-2008, 12:21 PM
rjuyal's Avatar
rjuyal rjuyal is offline
Senior Member
 
Join Date: Mar 2008
Location: Delhi, India
Posts: 160
rjuyal is on a distinguished road
may be this is not the correct thread but still..
Hi,
I am using this approach!

is there any speed overhead:-

Code:
public interface myInterface{ public interface another1{ public interface another2{ pubic static String myVar1 = "var1"; pubic static String myVar2 = Utils.createName ( myVar1 ); } } public interface another11{ public interface another12{ pubic static String myVar11 = "var11"; pubic static String myVar12 = Utils.createName ( myVar11 ); } } }
then accessing like:
Code:
myFunction ( myInterface.another1.another2.myVar1 );
Code:
public interface myInterface{ pubic static String myVar1 = "var1"; pubic static String myVar2 = Utils.createName ( myVar1 ); pubic static String myVar11 = "var11"; pubic static String myVar21 = Utils.createName ( myVar11 ); }
then accessing:

Code:
myFunction ( myInterfacemyVar1 );

?? which one is preferrable , along with time complexity??? Please help
__________________
Newton said Gravitaion, Rakesh says Earth Sucks
Reply With Quote