uzma Akbar

Ranch Hand
+ Follow
since Sep 21, 2005
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 uzma Akbar

Congrats....

I passed my test few hours back of SCJP. I can understand your feeling of excitement....

many congradulation and hope for the best for future

uzma
18 years ago
Also ranchers thank you so much as whereever I used to get stuck Javaranch was the place

thanks again!
Uzma
18 years ago
Hey guys I scored 83% in SCJP 1.4. I am so excited.

Tips:

Khalid Mughal and K&B books. One needs both of them K&B acts as a starter while Khalid Mughal serves the full meal and solidifies the concepts.

On the last few days revision of everything is necessary as sometimes very small concepts you may confuse. Like in my case I was thinking 4.0==4 would be false on the day before the test. what I did was quick revision of selftest questions(K&B) of every chapter which was bringing up my missing concepts.

Do make notes as it really helps in the end

Practice Mock Tests as much as possible.

Wish you all the best for those who are preparing

Uzma
18 years ago
I just want to add that practice might be common in other countries. it was good that this was broght into notice at least. Sun should do something really impressive so that this malpractice should end in all countries.

Thanks

uzma
This practice was quite common in case of Microsoft certification but I am really diappointed to hear about Java certification. One who is putting so much effort would not like that the other person would get away without putting effort and scores more. I think the issue should be reported to Sun and it's their liability to maintain the credibility then.

Thanks for bringing up the issue as if it is not talked then there are no chances to rectify

uzma
I think their are some other minor/major differences
1) Anonymous class can only implement (though it cannot use the implements keyword) one interface while local class can more.
2) Anonymous class has to extend already existing class, while local class can be new
3)Anonymous class cannot extend anyother class except Object while implementing interface

I hope this'll help

uzma
I smiley is taking one ; so I am writing once again

for(;;; ) is a valid loop
uzma
for(;; is even a valid statement. this means that it is a infinite loop.

uzma
thanks weber and mahapatra

These links are quite helpful. Knowing only the difference between sleep and wait did not really help when it comes to programs and their output. I get really confused what exactly be the out put and sometimes the output is undetermined.

thank you guys for putting your effort again!

uzma
Hey guys
Can any one help me in having a link about Threads.
My real problem is I can't judge the output in the programs with threads especially when wait, sleep methods are used.

I appreciate any help in advance
uzma
downcasting means assigning the reference to Class B's reference with casting necessary.

thanks
uzma
Hey Miki


This I got from the net:

The first rule to follow when making a class thread-safe through synchronizing its critical sections, therefore, is to make its fields private. Any field that you need to coordinate multithreaded access to must be private, otherwise it may be possible for other classes and objects to ignore your critical sections and access the fields directly.

I think it makes sense. What do you say?

Please read the following for your further understanding:

http://www.artima.com/designtechniques/threadsafety.html


thanks

uzma
Hi Miki

Every Object has one lock and when a method is synchronized then thread running that method acquires the lock and while that thread is running no other thread can aquire the lock as well as run that method. This class is thread safe becasue no other method is accessing the instance variable except this method. If there would have been another method accessing the instance variable and the other method is not synchronized then only the method which is synchronized would have been thread safe.

There is another scenario in which sometimes there is a call of non- synchronized method from synchronized method only. that also makes the class thread safe.

I hope this 'll help

uzma
Thank you for putting effort to answer.

I run it again and it gives true, false, false. Please Raj run it again the first query I posted.

My confusion was that as && as higher priority than || so it should be evaluated first and c should get true but as I posted in my third post:

In evaluation of boolean expressions involving conditional AND and OR, the left-hand operand is evaluated before the right one, and the evaluation is short-circuited (i.e., if the result of the boolean expression can be determined from the left-hand operand, the right-hand operand is not evaluated). In other words, the right-hand operand is evaluated conditionally.

I concluded it is not the matter of precedence but the matter of left operand.

Please correct me if I am wrong

uzma
got the answer
posting for others

In evaluation of boolean expressions involving conditional AND and OR, the left-hand operand is evaluated before the right one, and the evaluation is short-circuited (i.e., if the result of the boolean expression can be determined from the left-hand operand, the right-hand operand is not evaluated). In other words, the right-hand operand is evaluated conditionally.

thanks

uzma