Profile cover photo
Profile photo
Mayank Agarwal
134 followers
134 followers
About
Posts

Post has attachment
Get current executing method name in Java
//Get method name using Java.lang.Class.getEnclosingMethod()     public static void getMethodNameUsingClassInstance() {         String methodNameUsingClassInstance =             new Object() {}.getClass().getEnclosingMethod().getName();         System.out.p...
Add a comment...

Post has attachment
Java Comment //$NON-NLS-1$
$NON-NLS x$ is specifically for externalization and internationalization. It marks a string as being inappropriate for externalization. Eclipse and potentially other IDEs can be configured to present warnings when strings are hardcoded into a program so tha...
Add a comment...

Post has attachment
Create Runnable Jar - Eclipse Options
When exporting to a Runnable Jar, there are three options in eclipse Helios. Extract required libraries into JAR Package required libraries into JAR Copy required libraries into sub folder next to JAR. What are differences : Extract required libraries into ...
Add a comment...

Post has attachment
Java toString()
toString() public String toString() { StringBuilder builder = new StringBuilder(); try { Class e = Class.forName(this.getClass().getName()); builder.append(this.getClass().getSimpleName() + " [ ").append( System.getProperty("line.separator")); while (e.getS...
Add a comment...
Wait while more posts are being loaded