This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
hi,all I am researching some codes.the below lines make me puzzle. I don't understand the meaing of them System.out.print("preloading..."); c = uci.gef.CmdSetMode.class; c = uci.gef.ModePlace.class; c = uci.gef.ModeModify.class; c = uci.gef.SelectionResize.class; c = uci.ui.ColorRenderer.class; c = uci.ui.Swatch.class; c = uci.util.EnumerationEmpty.class; c = uci.util.EnumerationSingle.class; c = uci.uml.util.GenCompositeClasses.class; c = uci.uml.visual.FigClass.class; c = uci.uml.visual.FigPackage.class; c = uci.uml.visual.FigInterface.class; c = uci.uml.visual.FigAssociation.class; c = uci.uml.visual.FigGeneralization.class; c = uci.uml.visual.FigRealization.class; System.out.println(" done preloading"); I guessed that it will make a shorter time in instancing object.But I make some test that proved my guess is wrong. Is there anyone give me some ideas?
is this a puzzle or what, Toy: if you don't mind, could you please (i repeat please) tell us how you got this code or where you found it? that way, I think we could make a closer guess. At this stage, if the comments mean something to me then. I would say: This is a part of code from a static block which is attempting to load some class libraries. regds. - satya
I got these codes from the argo-uml that is a open source project. I don't understand why it declare these classes during the starup.Could it improve the performance? I read the java doc carefully,but get nothing about it. I tested the below code and find the consumed time is same. anyone can tell me the benefits of these codes. code 1: System.out.println(System.currentTimeMillis()); new ClassA(); new ClassB(); System.out.println(System.currentTimeMillis()); code 2: System.out.println(System.currentTimeMillis()); Class c = ClassA.class; c = ClassB.class; new ClassA(); new ClassB(); System.out.println(System.currentTimeMillis());