sangeetha raj

Greenhorn
+ Follow
since Feb 23, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by sangeetha raj

Hi All,


Please find below the code and clarify me what is the error in that..




Thanks,
SR
Hi All,


I don't know how to deal with GC and Generics kind of questions...Please guide me how to deal it..
Can anybody explain me with some examples ?


Thanks in advance,
SR
Hi Anayonkar,

Thanks for the clarification..



Hi All,

I have a doubt in this program

1)Since here class A is abstract , we can't instantiate it ,so line 5 will cause compile time error.. (or)

2)Since line 9 is unreachable , it will cause compile error

Which one will be the answer..Because , in Examlab mock test , they have given option 2 is the answer..Please explain me..




Thanks,
SR

[HENRY: Added Code tags]
Hi,

am also planning to give my test in APR..but i don't have the confident that i pass the exam..I did take many mock tests, but i couldn't get good marks in mock test also..
you mentioned that you took some mock tests in examlab..But i couldn't get any free mock test over there..please guide me how to get a free mock test...

Thanks in advance,
SR
9 years ago
Hi Murthy,


Thanks for the reply..Yes, i need one for SCJP 6 ...

Thanks,
SR

Hi All,

What is the different between exam number 310-065 and 1Z0-851 ? Both are same or different one ?
Hi,

I am planning to take SCJP 6 exam in APR - 2012..Now am in USA..If i buy sun exam voucher in India from NIIT kind of centers, can i use it here in USA..If so,please let me know the Procedures..If not, please let me know how to buy a voucher in discounted price in USA ?

Thanks in advance
SR
Hi Henry,

Thanks for the Reply..


Since Meat class implements chewable, can't we say something that extends chewable could be Meat ? And also is there any error in Line 21 in my code..Please explain...

Paul - Thanks for the reply..I couldn't understand, how List < ? extends Chewable > could turn out to be a List <Gum> at run time..Please explain me..

Halen ma - Thanks Halen for the reply...


Hi All,

Am also preparing for the SCJP 6 exam..Planning to take up the test in APR as am not that much confident in taking up the exam before that though am preparing for the test since past 6 months..
I am practicing some tests online ..But i could n't get average of 5 out of 10..am feeling bad of my self..

Please suggest me some genuine & worth taking MOCK test link..Reply in this regards will be highly appreciated..


Thanks in advance ...
SR
9 years ago
HI All,

Please explain me ,what is the error in the following code line numbers 21 and 22..

What my understanding is : In line 10,

List<? extends Chewable> printSize(List<? extends Chewable> list)

means, anything that extends Chewable type, that is Meat can be the return type of the Printsize..Line 22 Printsize return type is Meat ..So,what is the error in 22 ?

And also, explain for the line 21 error..


import java.util.ArrayList;
import java.util.List;


interface Chewable {}
class Meat implements Chewable {}


public class Tester {

public static List<? extends Chewable> printSize(List<? extends Chewable> list) { // Line 10

System.out.println(list.size());

return list;

}

public static void main(String[] args)
{

List<? extends Chewable> list1 = new ArrayList<Meat>(); // Line 16
List<Chewable> list2 = new ArrayList<Chewable>(); // Line 17
List<Meat> list3 = new ArrayList<Meat>(); // Line 18


list1 = printSize(list1); // Line 20
list2 = printSize(list2); // Line 21
list3 = printSize(list3); // Line 22
}

}


Thanks all..
SR
Hi,
Am new to this forum..I am preparing for scjp 6..I have a doubt in the following code..

I found that there is an error in line 6,because we can't input an array into an int..But they have given its correct in the scjp 6 (kathy sierra) book , self test section question number 10..Please clear my doubt..correct me if am wrong..Thanks in advance..

(In the book)They have given this as answer : 1 1 3 3 9 9

public class Circles {
4. public static void main(String[] args) {
5. int[] ia = {1,3,5,7,9};
6. for(int x : ia) {
7. for(int j = 0; j < 3; j++) {
8. if(x > 4 && x < 8) continue;
9. System.out.print(" " + x);
10. if(j == 1) break;
11. continue;
12. }
13. continue;
14. }
15. }
16. }

Thanks,SR