Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
import freemarker.template.*;
import
java.util.*;
import java.io.*;
public class FreeMarkerExample {
//Load the Templates only
once
static{
/*
Create and adjust the configuration */
Configuration cfg = new Configuration();
cfg.setDirectoryForTemplateLoading(
new File("/store/templates"));
cfg.setObjectWrapper(new DefaultObjectWrapper());
}
public static void main(String[]
args) throws Exception {
/* Get a template */
Template temp =
cfg.getTemplate("test.ftl");
/* Create a data-model */
Map root = new HashMap();
root.put("user", "John
Joe");
Map latest = new HashMap();
root.put("latestProduct", latest);
latest.put("url",
"test/yourTest.html");
latest.put("name",
"yourTest");
/* Merge data-model with template */
Writer out = new OutputStreamWriter(System.out);
temp.process(root, out);
out.flush();
}
}
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.