Daniel
Posts: 1
Nickname: danielj
Registered: Nov, 2003
|
|
performance issues with this code!
|
Posted: Nov 12, 2003 3:09 AM
|
|
|
Advertisement
|
public class CVSTagReader { public final static String cvsTag; static { cvsTag = "$Name: October $".substring(6, "$Name: October $".indexOf("$", 3) - 1).trim().replace('_', '.'); } }
<%=CVSTagReader.cvsTag%>
public class CVSTagReader { private static final String rawTag = "$Name: $"; private String tag; static { tag = rawTag.substring(6, "$Name: October $".indexOf("$", 3) - 1).trim().replace('_', '.'); } public String getTag() { return tag; }
}
<%=CVSTagReader.getTag()%>
What are the advantages of second over first?
How the memory is allocated and what is called Class, Variables, methods when compared to both?
How can it be more optimized?
|
|