Life is an amazing experience to behold at times. Other times it can be a bit of a nightmare. I guess it all depends on the day, now doesn’t it? Yeah, something like that. Who knows what this life will bring about. I for one don’t know. That’s the big secret behind this life I suppose. But life doesn’t have to be mysterious. Trying to figure out how this life work sat times- can be a nightmare. However all is not lost if you can have hope in something that will make life that much better. If we constantly allow our own thoughts and feelings to fight against us, we will never be better than we currently are. It’s easier said than done naturally. I am my own worst enemy, my worst critic. That’s simply how this life treats me at times. Not much else to comment about that. Am I playing the victim or simply stating the facts? Who can say for sure? I personally feel I’m just telling it like it is, nothing more. Sometimes I can’t determine my own thoughts from that of psychosis . Parts o...
A simple way to create html tags in Java.
It won't create a tree that you can parse, but it will create the text needed. You see we'll use the StringBuilder class along with the Formatter class to accomplish this. This provides a simple way to format a string without using String.format inside of a sb.append call.
import java.util.Formatter;
import java.util.Locale;
public class LocalMe {
public static void main(String[] args) {
StringBuilder sb = new StringBuilder();
Formatter formatter = new Formatter(sb, Locale.ENGLISH);
formatter.format("<%s>%s</%s>", "greeting", "Hello World", "greeting");
System.out.println(formatter.toString());
}
}
Comments
Post a Comment