wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply locked New topic
Author

Doubt

Sree Potluri
Ranch Hand

Joined: Aug 12, 2009
Posts: 62
public class Test {
//insert here
{
List<T> output = new LinkedList<T>();
for (T t:input)
output.add(0,t);
return output;
}
}

which can be inserted //insert here to compile and run without error
A. public static <T> List <T> backwards(List<T> input)
B. public static <T> List <T> backwards(List<? extends T> input)
C. public static <T> List <T> backwards(List<? super T> input)
D. public static <T> List <? extends T> backwards(List<T> input)
E. public static <T> List <? super T> backwards(List<T> input)
F. public static <? extends T> List <T> backwards(List<T> input)
G. public static <? super T> List <T> backwards(List<T> input)

Correct answer A, B, D, E

Help me understand this
Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
simple use public static void main(String args[]) method in your enum...and then print Winter.getInfo() on the console..or else Season.Winter.getInfo() from some other class


scjp 1.6 91%, preparing for scmad
"Time to get MAD now.. we will get even later"....by someone unknown
Raju Champaklal
Ranch Hand

Joined: Dec 10, 2009
Posts: 521
how could you change your question....for a new question you should have started a new thread....
Jeevan Reddy
Ranch Hand

Joined: Nov 10, 2009
Posts: 142
Raju Champaklal wrote:how could you change your question....for a new question you should have started a new thread....


I didn't know the question was edited.
I was wondering about your reply. Trying to figure out , then I saw your next reply.


SCJP 1.6 (94%)
http://faq.javaranch.com/java/JspFaq
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3011
    
  34

Sree, please UseAMeaningfulSubjectLine when you ask a question. You may also have a look at this faq.


Founder of ExamLab and Systemup
See how I can help you to become an awesome programmer
Sree Potluri
Ranch Hand

Joined: Aug 12, 2009
Posts: 62
Sorry for the confusion. But can you help me understand about this one.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3011
    
  34

Sree Potluri wrote:Sorry for the confusion. But can you help me understand about this one.

Let's continue the discussion in your other topic.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doubt
 
Similar Threads
Generic Method problem
Generics
Generic
Help me understand
Generics