¡@

Home 

java Programming Glossary: gentest

Why do I get “non-static variable this cannot be referenced from a static context”?

http://stackoverflow.com/questions/10301907/why-do-i-get-non-static-variable-this-cannot-be-referenced-from-a-static-contex

a static context On the other hand when I put the sublass GenTest 's class code outside the the parent's class code JavaApp1 I.. I do not get this error. public class JavaApp1 class GenTest @Deprecated void oldFunction System.out.println don't use that.. That's ok. public static void main String args GenTest x new GenTest x.oldFunction x.newFunction Why is this happening..

How to get parametrized Class instance

http://stackoverflow.com/questions/71585/how-to-get-parametrized-class-instance

i.e. Class List String . Like in this snippet public class GenTest static T T instantiate Class T clazz throws Exception return.. like to pass in Class ArrayList String ArrayList String l GenTest.instantiate ArrayList.class I run into variations of this problem..