Been Zaidi wrote:From the console here is the input given
In my opinion, the instruction is asking to find one or zero match of aa. But here is the output generated
Been Zaidi wrote:Another additional thing, inside the book it is written that the engine backtracks as well. Why is that so?
saloni jhanwar wrote:
You didn't get my point, yes above code will work fine ,because you are compiling file using source file name while interpreting using class name that is different scenario but i asked that if i interpret also using same source file name ? then it wont work.
saloni jhanwar wrote:Hi Anayonkar Shivalkar
You were giving me wrong knowledge that is not good .Every greenhorn posts doubts here to get clarification not to get more confused.This all will lead to frustrating about this forum.
Returns the identifier of this Thread. The thread ID is a positive long number generated when this thread was created. The thread ID is unique and remains unchanged during its lifetime. When a thread is terminated, this thread ID may be reused.
Ted North wrote:Why would the constructor load twice though if construction of an object only depends on the Weather class and not the enum blueprint?
Anayonkar Shivalkar wrote:What do you mean by 'program doesn't run'? Have you written your main method in non-public class? If yes, then it won't work.
saloni jhanwar wrote:When I tried different name other than non public classes, then my program doesn't run with that, then what is use to put different name and why should i use.Thanks
The Iterator provided in method iterator() is not guaranteed to traverse the elements of the priority queue in any particular order. If you need ordered traversal, consider using Arrays.sort(pq.toArray()).
Matheus Souza wrote:This is not what meant. I want to know if I lock an method syncronized, the whole set of static members would be locked too?
Matheus Souza wrote:I have another question: when I use the syncronized keyword in a static member it means that all my template (static member - variables and methods) are lockeds?
Helen Ma wrote:By the way, will the following scenario be possible ?
Janki Shah wrote:Thank you Norbert for your explanation. So, in order to work with wait(), notify(), and notifyAll()... All these three methods have to acquire a lock on an object not on threads, Right? And wait() and notify() or notifyAll() they both have to get lock on the same object to work with each other? Please correct me if I am wrong.
Janki Shah wrote:But this conflicts with this " the thread must own the lock on the object that wait() is being invoked on " From K & B book chapter 9 question 7.
I am very confused in this logic who should own the lock on whom??? Can you please explain this?