Siva Rsrk

Greenhorn
+ Follow
since Jun 15, 2009
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 Siva Rsrk

Bear Bibeault wrote:"Siv Rsk", this is your final warning. Please check your private messages for an important administrative matter.




why you have given me the warning
12 years ago
Hi,

for finding length of an array we use length variable.
for ex : arr.length it gives lenght of an array arr.

But where is this length variable in java api, i saw it in Array and Object class, because array itself be an object.(even i didn't understand this , how array itself is an object interms of primitives, how we justify this)

but i didn't find.



Any One help please..........

12 years ago
What i understand from Sebastian & Jesper, instead of declearing 4 final varibles(from Card Example), then we maintain these 4 final varibles in a single unit called enum, right.
And one more usage is to maintain like a key & value pairs.
12 years ago
Hi Java Achivers,

Just i read enums in K & B book, after reading this i understand the use of enums , but i didn't understand properly where we use this and Is it really useful in real time situations.
Can any one help me for this.

Thanks & Regards
Siva
12 years ago
Iam very thankful to both of you Cameron & Stephen for your suggestions, really it helps me a lot.

Thank you once again!
Thank you Sebastian for your reply, it creates me a positive attitude for the SCJP ,

but one thing is iam very lazy to write code and also iam afraid of the errors , how to avoid this, Is any valuable suggesstions.
Hai Every One,

Here in this ranch , all were wrote i got SCJP 80% ,90 % and 98 % like soon...., Is this an easy exam,
because of no one didn't write i am unable to clear in first attempt.
If any one didn't clear in first attempt, and later cleared please help to ranchers even me also, what are the mistakes you did and better approaches have to take for going to exam


Thanks Achievers

Siva.Rsrk
Here,

when i read this Thread, i got a new doubt,

what is the difference between when the variable is declared in side the main method and out side the main method,
Here our friend posted same statement like
final int i;

Inside main method its working fine, but outside of main method it is not working,how?
what is the JVM flow in this.


Hi Every One,

When iam using Wrapper Classes,
i got following error ,
GenericEx1.java:6: cannot find symbol
symbol : class T
location: class GenericEx1
T it=obj.add(3,4);

Below is My Application

public class GenericEx1
{
public static void main(String[] args)
{
GenOne obj=new GenOne();
T it=obj.add(3,4);
System.out.println("i Val---"+it);
}

}
class GenOne<T>
{
public T add(T i, T j) {
System.out.println("i--"+i+"--j--"+j);
return i;
}
}



When i change my Application to like this

public class GenericEx1<T>
{
public static void main(String[] args)
{
GenOne obj=new GenOne();
T it=obj.add(3,4);
System.out.println("i Val---"+it);
}

}
class GenOne<T>
{
public T add(T i, T j) {
System.out.println("i--"+i+"--j--"+j);
return i;
}
}


This is gots following error

GenericEx1.java:6: non-static class T cannot be referenced from a static context

T it=obj.add(3,4);

Please any one can help me regarding this problem and how to use Wrappers in a very better way
Hi Every One,

When iam using Wrapper Classes,
i got following error ,
GenericEx1.java:6: cannot find symbol
symbol : class T
location: class GenericEx1
T it=obj.add(3,4);

Below is My Application

public class GenericEx1
{
public static void main(String[] args)
{
GenOne obj=new GenOne();
T it=obj.add(3,4);
System.out.println("i Val---"+it);
}

}
class GenOne<T>
{
public T add(T i, T j) {
System.out.println("i--"+i+"--j--"+j);
return i;
}
}



When i change my Application to like this

public class GenericEx1<T>
{
public static void main(String[] args)
{
GenOne obj=new GenOne();
T it=obj.add(3,4);
System.out.println("i Val---"+it);
}

}
class GenOne<T>
{
public T add(T i, T j) {
System.out.println("i--"+i+"--j--"+j);
return i;
}
}


This is gots following error

GenericEx1.java:6: non-static class T cannot be referenced from a static context

T it=obj.add(3,4);

Please any one can help me regarding this problem and how to use Wrappers in a very better way

Vijitha Kumara wrote:

Siva Rsrk wrote:Any One can help me where i can get java source code, because i want to know internal code of many java collection classes and what is the logic they implemented for sorting and all.



That's directly inside your JDK installation folder. Look for the archive file called src.




Thank you Vijitha for giving me Valuable information
Hi All,

Any One can help me where i can get java source code, because i want to know internal code of many java collection classes and what is the logic they implemented for sorting and all.

Thanks in Advance
Siva

This is information is really helpful for me,
Congrats
12 years ago
Iam Planning to write SCJP 1.6 exm, but i don't know how to start preparation and all, Is it necesary to read all the syllabus, And which book is prefer and anyone tell me where i can get MOCK Exams and previous paper.

Please help me for achieving SCJP.