This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.log4j.Logger; | |
/** | |
* Hello world! | |
* | |
*/ | |
public class App { | |
private static Logger log = Logger.getLogger(App.class); | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.learnquest; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Target; | |
@Target(ElementType.TYPE) | |
public @interface ClassPreamble { | |
String[] authors(); | |
double version() default 1.0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.learnquest.propertyeditor; | |
import java.beans.PropertyEditor; | |
import java.beans.PropertyEditorSupport; | |
public class Test { | |
public static void main(String[] args) { | |
Person p = new Person("Sarah:Garwood"); | |
System.out.println(p.toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lq.interfaceimpl; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import org.springframework.beans.factory.annotation.Qualifier; | |
@Retention(RetentionPolicy.RUNTIME) | |
@Qualifier | |
public @interface Criteria { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.learnquest; | |
import java.lang.reflect.InvocationHandler; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Proxy; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.logging.Logger; | |
public class ProxyTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File; | |
import java.io.IOException; | |
import java.util.Enumeration; | |
import java.util.concurrent.ConcurrentLinkedQueue; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Semaphore; | |
import java.util.concurrent.TimeUnit; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package learnquest; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
public class TestGenerics { | |
public static void main(String[] args) { | |
ArrayList<Number> list = new ArrayList<Number>(); | |
list.add(new Integer(0)); | |
list.add(new Integer(1)); | |
list.add(new Integer(3)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package learnquest; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.Map; | |
import java.util.Map.Entry; | |
import java.util.Set; | |
public class BoxTest { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package learnquest; | |
public class Rectangle { | |
private final Size size; | |
public Rectangle(Size size) { | |
this.size = size; | |
} | |
public Size getSize() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package learnquest; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
@Info(authors = @Author(fn = "Karan", ln = "Malhi"), version = 1.1) | |
public class Person { | |
@Info(authors = { @Author(fn = "Karan", ln = "Malhi"), |
OlderNewer