Zeeshan Sheikh

Ranch Hand
+ Follow
since Nov 20, 2011
Zeeshan likes ...
MySQL Database Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
13
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Zeeshan Sheikh

Fazile, you are absolutely right. I think most people can not afford that kind of price. Back in 2009, I read two books by Paul DuBois for my certification preperation.

MySQL (4th Edition)

MySQL Study Guide

and I think the best source is MySQL website http://dev.mysql.com/

Hope this will help. Thanks
Congratulations !!!
11 years ago
Really !!! .. I googled it and found several articles even related to your question as well.
11 years ago
This example is from K&B book.

does the for loop behaves uniquely for each thread..


No loop always behave the same way. In the book its explained several time the "bahaviour of the thread is never guaranteed"

If you run that program you will see that thread (fred) runs and it tries to withdraw and goes into sleep mode and then 2nd thread runs and tries to withdraw and eventually you will see that only 50 dollars were in the account and 60 were taken out from the account. Keep reading and she will explain more about this example. YOu have to make it atomic (synchronization will be introduced to resolve this issue.)
The runtime system always executes the statements within the finally block regardless of what happens within the try block.
11 years ago
interrupt method is NOT deprecated as per Java API.

At line1, we have a sorted array of strings 'sa'.


//line 1: Searches the specified array (sa) for the specified object (rs) using the binary search algorithm.

Then at line2, why the overloaded version of method binarySearch() is needed which takes a Comparator as an argument?


Its the logic whoever wrote the program !! The following method is used

//line 2: Method Signature: public static <T> int binarySearch(T[] a, T key, Comparator<? super T> c)
The array to be searched is sa
key the value to be searched for is one
c the comparator by which array is ordered (rs). (which is why comparator argument is used)

CompareTo comparison is based on the Unicode value of each character in the strings.

The result is a negative integer if this String object lexicographically precedes the argument string.
The result is a positive integer if this String object lexicographically follows the argument string.
The result is zero if the strings are equal; compareTo returns 0 exactly when the equals(Object) method would return true.

lexicographic ordering: If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different, or both.

Why the 'two argument' version of this method doesn't work here and gives unpredictable output?


Arrays.binarySearch is producing the right results. I do not see any un-expected results.
sa has sa[0] = four, sa[1] = one, sa[2] = three, sa[3]= two and for overloaded binarySearch method right output is produced.
Congratulations !!!
11 years ago
Awesome ... Congratulations !!!
11 years ago
In my personal opinion a graude in IT can not be compared with a person who is just java certified. A graudate is exposed so all aspects of software development. Coding is only one small part of it but a certified person will not be able to get the BIG picture but he will be able to code (I think) if he is that good ... I have seen people with no degree in computer science and quite successful in IT & vice versa. All I can say good luck
11 years ago
Please bookmark Java API & Oracle Tutorial your homepage. Trust me this will answer most of your questions.
11 years ago
Please check this Oracle Tutorial. THanks
11 years ago
So basically you are saying "Please do the assignment for you". Why?? If you took computer science as a major you should be the one studying .. anyways no one will do assignments here, you have to show some effort. Try it yourself and if you don't understand certain concepts or in your case syntax then ask a question with compiler error. Thanks
11 years ago