Sachin Adat

Ranch Hand
+ Follow
since Sep 03, 2007
Merit badge: grant badges
For More
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 Sachin Adat

Exactly what I was talking about. Thanks a lot for clearing my misconception.
Now, I guess, I can search for tutorials on the web....... if you know of some good ones, please tell.
There was a tutorial in the link you gave, but the pdf link does not load

Thanks again
13 years ago
Is it correct, to write a tag file by creating a file with .tag as extension without writing the taglib and java classes for it in Struts 2.
If yes, please lead me to some documentation or tutorial on it.
If not, why? I am sure it can be done and have seen it working.
Is it deprecated or something cause I am not able to find anything on the web.
13 years ago
Wow, nice catch Ankit, the place where I was using s:date without an iterator was a date and it was working fine.
And, inside the iterator I m getting a long, so it would not show the date.

Thanks a lot, I think I can fix it now
13 years ago
Has no one ever got a requirement like this
13 years ago
Yes Ankit, I started from that
and I am able to see my date in long using this:


But I want to see it in the date format, something like this:


which comes as empty
13 years ago
Can someone lead me to a good struts 2 iterator tutorial.
I want to show a date (basically use <s:date>) inside an iterator.
13 years ago

Mo Jay wrote:I am really not sure what you mean exactly, but I just want to say that when we say 1 object is eligible for GC we mean the entire object including any instance variables and data in it. In this case when we said a1 is GCed that includes a1.b2 because it is part of it as you stated above.


I don't agree to this......

If an object is available for GC, and it has an instance variable which is another object on the heap, then we say 2 objects are available for garbage collection.

Can someone confirm this........
Thanks Cameron

Cameron Wallace McKenzie wrote:SCJP 6 is a tough cert. Congrats!


It surely is.......I didn't even sit for 3 and half hours to study for the exam........
14 years ago
Hi Anand,

Welcome to Java Ranch!!!

AnandKumar Verma wrote:Does SCJP contain multiple choice question with chechbox and single choice question with radio button?


Yes. You don't need to worry about the number of answers. You will be told to mark the required number of choices.
For example if there are 3 correct answers for the question, you will be told to "Choose 3"

Jason Irwin wrote:Yeah, I'm sure it's K&B being evil with extra evil, a side of evil and an extra-large evil shake.



Sure they are in the book, but when you are giving the exam, its just cakewalk.........
You feel its so easy.......they really toughen you for the exam.

But, anyone giving the exam beware of being careless, sometimes it makes you overconfident when you see easy questions.
You may jump straight into a pitfall....

Sonali Sehgal wrote:How do we perform this program of inserting at 2nd postion...???


We cannot perform that operation, as you cannot change the length of an array.
But if -3 is returned, it means that the search you did was unsuccessful(because of the minus sign),
and if you want to insert this value in the array and keep it sorted, insert it in the 3rd position(0 based will make it index[2]).
How you do it, depends on you (create a new array and insert it). I don't know of any method in the APIs that does it.

API wrote:Returns:
index of the search key, if it is contained in the array; otherwise, (-(insertion point) - 1). The insertion point is defined as the point at which the key would be inserted into the array: the index of the first element greater than the key, or a.length if all elements in the array are less than the specified key. Note that this guarantees that the return value will be >= 0 if and only if the key is found.


In short, it means if the search is successful, it will return the index of the found object.
If its unsuccessful, it will return the index where the searched object can be inserted so that the list will remain sorted.
So, if the searched object is to be inserted at 2nd position -3 will be returned.
In the above example, the search is unsuccessful and the new String object is to be inserted at the 0th position(spaces come before alphabets).
So you get -1 as the output. Every time, a binary search will return you an int between -(n+1) to n-1 where n is the length.

HTH

Deepak Bala wrote:I dont think this is from Kathy and Bert's book


I think I saw a question like this in K&B......Self Test......
Do you know what the int returned by binary search means..........?
Special thanks to you Ankit, you are really active and were of great help............especially when I was very low on confidence once.
If you remember, you asked me to call isReadyState()......I just couldn't call it till the end.
The expiry date forced me to give the exam on the last date....
I had given only 2 mocks about 4 days before the exam........and didn't get much time to test myself.
The mocks told me that I was weak in the API, concurrency and Generics.
And I was really tensed before the exam, even thinking about what to do if I fail. After the exam, I was pretty happy with the result.
Got 100% in concurrency, API and 90% in Generics. Got 8 questions wrong in total and weak scores were in fundamentals and basics.
So maybe I made silly mistakes......... . 3 and half hours on a chair is a tough job.......haven't done it for years now....

Thanks again..........
14 years ago