kiruthigha rajan

Ranch Hand
+ Follow
since Dec 29, 2011
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by kiruthigha rajan

Amit Ghorpade wrote:IMHO I think Ulf was trying to take our attention at the NotACodeMill policy sprinkled with his own way of humor.
In response to him being "harsh", I would suggest you read what title is displayed below his name and the FAQ on SaloonTitles.

So what if he is a marshal?? so members dont matter for ranchforum?? if so im ready to quit from this forum..
Title wont matter..Its the way of talk matters..IMHO it was not a humor..
10 years ago
Hai im kiruthigharajan on 19th november 2012,i posted a question regarding a java program in the forum.It was from an assignment book(it was not alloted to me, as i have completed my college life) and i couldnt quote the book name as it was a private book of a college,and i tried to solve it but alas i couldnt do so, so i asked help,and i asked the code which was my mistake as i forgot that coderanch doesnt provide code.When i posted this question Mr.Ulf Dittmer gave me a harsh reply his reply was:
"So you want us to do your assignment for you? Will we get the credit for it as well? Or were you thinking of paying us?"
i was hurt by his reply and gave a harsh one in reply
my reply was:
excuse me.. it was not assigned for me..i saw this on a book..i tried out of curiosity.. i couldnt get..i just asked help so that i can learn..
But i got a private message that i did a wrong one..and they are deleting my post..
If i was wrong then mr..Ulf Dittmer is also wrong. This again hurt me..
Really disappointed for the way code ranch has treated me.
is this the way you treat a member of a forum??
you can check the post and his reply from this link
10 years ago
Hai im newbie to Android..
Im having some doubts in this code..

public class MainActivity extends Activity {
public final static String EXTRA_MESSAGE = "com.example.myfirstapp.MESSAGE";
Intent intent = new Intent(this, DisplayMessageActivity.class);
EditText editText = (EditText) findViewById(;
String message = editText.getText().toString();
intent.putExtra(EXTRA_MESSAGE, message);

1)Why we are using casting in EditText
2)What is putExtra(EXTRA_MESSAGE,message) and its use??
3)Why is MY_MESSAGE assigned to com.example.myfirstapp.MESSAGE? and What is com.example.myfirstapp.MESSAGE?
thanks in advance
10 years ago

Ulf Dittmer wrote:So you want us to do your assignment for you? Will we get the credit for it as well? Or were you thinking of paying us?

excuse me.. it was not assigned for me..i saw this on a book..i tried out of curiosity.. i couldnt get..i just asked help so that i can learn.. [DELETED]
10 years ago
write a java program that should change the case of every second character to the upper case and print them
for instance:input:hello world
output should be:hElLo WoRlD
please give the code
10 years ago
Hi im new to Android can anyone please tell me what does these two methods mean (OnsaveInstanceState() and onRestoreInstanceState() ).
and what is the purpose of using these methods...
Thanks in advance
10 years ago
i am having some doubts in the following cp..

1) -cp /dirB:/dirA/dirB/dirC

here the directories are searched from root as the / indicates..
my question is what directories will be searched if the current directory is dirA?
the answer given in book is only dirC but how??directory B will also be searched when DirA is treated as current directory

2)"It doesn't matter what the current directory is; since absolute paths are specified the search results will always be the same."
im unable to understand the meaning of this line

thanks in advance

gurpeet singh wrote:here we are creating two threads and we are passing two different runnable targets to these two threads. so even though there is synchronized keyword in the method move() but the two threads are acquiring locks on two different chess objects. so two threads will be running concurrently. keep in mind that when a thread enters a synchronized method, it will acquire lock on the object currently running the method i.e. this. so in two thread both threads are getting locks on different chess objects and hence the output.

thanks alot for the explanation..i got the point now

And given these two fragments:
I. synchronized void move(long id) {
II. void move(long id) {
When either fragment I or fragment II is inserted at line 7, which are true? (Choose all that apply.)
Compilation fails
B. With fragment I, an exception is thrown
C. With fragment I, the output could be 4 2 4 2
D. With fragment I, the output could be 4 4 2 3
E. With fragment II, the output could be 2 4 2 4
3 C and E are correct.
I thought the answer is E.But both C and E.How cum it possible..we are using syncronization in Fagment 1 which locks the object.
then how can it acquire the lock of another object??
i searched the posts but couldn't get it.
please explain in detail thanks in advance

Ankit Garg wrote:Synchronization and Serialization are two different concepts, don't confuse them. Serialization is not on the exam but synchronization is...

thanks ankit..yeah i know..i did the mistake due to lack of concentration while posting..i have corrected it couple of hours ago
does serialization concept in Chapter no.7?there are many posts that says that Serialization concept is not included in the exam
Kindly reply
thanks in advanc

Hai im having doubt in this line

int i = ((Integer);

1)why casting is done here and why we have used intValue().

2) Im having doubt in hasNext() there are two elements.
in the first hasNext() test the value is true and it enters into the loop and it points to the next element.
when again the hasNext() is checked it should return false as there no element after 6.then how it is executed??

please explain in detail the execution of hasNext() in detail thanks in advance

i have some doubts in this code.
As far as i understand "The Map interface maps unique keys to value means it associate value to unique keys which you use to retrieve value at a later date."
when we see the first output "System.out.println(m.get("k1"));" it printsthe hashcode and not the aiko
But this line prints the System.out.println(m.get(d1)); // #4 the dog key
As hashMap returns the value of the key then why its not returning in the first case..please explain how hashMap works..
thanks in advance

class SaveMe implements Serializable{
transient int x;
int y;
SaveMe(int xVal, int yVal) {
x = xVal;
y = yVal;
public int hashCode() {
return (x ^ y); // Legal, but not correct to
// use a transient variable
public boolean equals(Object o) {
SaveMe test = (SaveMe)o;
if (test.y == y && test.x == x) { // Legal, not correct
return true;
} else {
return false;
my doubt is

test.y refers to which y
and test.x refers to which x
please explain in detail
thanks in advance

At line 16, "ma" contains 6,4 owing to the assignment in the previous step

yeah typing mistake...
thanks alot