Rishi Dhar

Ranch Hand
+ Follow
since Sep 11, 2013
Rishi likes ...
Tomcat Server Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
3
Received in last 30 days
0
Total given
5
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rishi Dhar

Thanks to all the ranchers and special thanks to ENTHUWARE for such a elaborative and easy to use software which helped me in achieving this certification.
My preperation plan was as follows :
1.Studied Head First Servlets And Jsp thoroughly thrice.
2.Studied Servlet 3.0 specification and Jsp 2.0 specification.
3.Mock exams from Enthuware EE5 and EE6 with average score of 75%.
So please feel free to ask any queries related to this certification.
Enjoy          
3 years ago
If i take the EE5 exam now and if i got certify then will my credentials will expire too? Reply ASAP.
Can anyone tell me weather to go for OCWCD 5 or 6 . I am asking this question because i wanted to know weather there are resources easily available for the particular exam or not?
And please share your experiences with the exam.
How is the book "Struts 2 in Action" for beginners...and if you have any suggestions for some good books for beginners so feel free to suggest...
And one more question that how much Servlets and Jsp knowledge is required to start up with Struts since i have made 1 project in these 2 technologies but have not used it to greater extent...
6 years ago
It gives you compilation error because you are using a reference Sorting s; which has not been initialised yet since as we know that the reference type should be initialised in stack before using it, so there is no value assigned to reference variable s. You can overcome compilation error by assigning s=null;
Congratulations on passing your Certification.
6 years ago
Whenever you declare and initialise your List without Generic as follows:---> LinkedList li=new LinkedList(); JVM creates a list of Object in which you can add any element that IS-A Object or Object itself.Now adding
li.add("abhi"); //will add String Object to List since String IS-A Object
li.add(56); // will add new Integer(56) to List since Integer IS-A Object and the addition will happen after autoboxing of an int to Integer
li.add("shek"); //Again add a String Object to List.
Now when you say
li.add(1,"soni"); // Overloaded version of add(int index, E element) ; See List interface for details in Java Doc.
the above method will insert "soni" String element into index position (1) of List.//Note index are always 0 based.
When passing li to System.out.println it will call toString() method in all List elements and will print the elements in specefic index order.
Are there any sites that provide free website hosting in Java???
6 years ago
JSP
Animal
^
|
|
Dog
^
|
|
Fido

When you are using wildcard List<? super Dog> it means you can pass any type that is Dog or superclass of Dog and we can add anything that is of type Dog or any subclass of Dog, this happens because as we know in polymorphism a parent type reference can hold its subclass object type.For example
(1).addAnimal(new ArrayList<Dog>());//method call or
(2).addAnimal(new ArrayList<Animal>());//method call
(3).public void addAnimal(List<? super Dog> animals) { }//called method
In the above calls the called method guirantees that adding anything that is Dog or subclass of Dog is acceptable weather you pass it (1) or (2) to (3).
When you are using wildcard List<? super Dog> it means you can pass any type that is Dog or superclass of Dog and we can add anything that is of type Dog or any subclass of Dog, this happens because as we know in polymorphism a parent type reference can hold its subclass object type.For example
(1).addAnimal(new ArrayList<Dog>());//method call or
(2).addAnimal(new ArrayList<Animal>());//method call
(3).public void addAnimal(List<? super Dog> animals) { }//called method
In the above calls the called method guirantees that adding anything that is Dog or subclass of Dog is acceptable weather you pass it (1) or (2) to (3).

But while using wildcard List<? extends Animal> you can pass it any List that is of generic type that is of type Animal or subtype of Animal.This syntax is used because we are telling the compiler that we are only using the List just for reading purpose and we will not add anything to it, if added the compiler will issue a compilation error.Error is given by compiler because imagine if addition was allowed in this syntax we would have added a wrong type into a wrong list since we could have passed it ArrayList<Dog> and we were free to add a Cat object into it and then at some point in runtime it would have given a Runtime Exception.
The <? extends Type> is meant to just use it for reading purpose and nothing else.
OCWCD EE5 better or EE6 please guide me since i have HF Jsp and Servlets book and its covering all topics of EE5 and i cant get any EE6 book which covers all topics Objective wise...
Please anyone can tell me which books and mock test sites are useful for preperation of OCWCD exam?
can anyone tell me which book is the best for Struts 2 for beginners?
6 years ago