![]() Related Questions As of now ,what i know abt cloning is that we can make a field to field copy of an object.ie when we As of now ,what i know abt cloning is that we can make a field to field copy of an object.ie when we clone an object,its state as well as a its behaviour is copied to the cloned object.My question is what is the neccesity of it? cant we create another object of the same class? so how does its different from cloned object (that is creating another object of that class rather than being cloned).is there any security issues coupled with this cloned object? And What is the Concrete purpose of Tell me o/p of the mentioned code fragment.String s1 = "shailesh";String s2="shailesh";System.out.println(s1.equals(s2));System.out.println(s1==s2); Answer is truetrueEvery time we make any string constant same memory referenced will be assigned if the string constant is same. That's why both obj. s1 and s2 refer to same memory. View Question | Asked by : Shailesh What is the difference between equals() method and == operator.when we use 2 same strings for finding of whether both strings r equal or not by using these two,it will give same answers.i.e true and true.so what is the main defference between equals() and ==. Read Answers (2) | Asked by : haritha A) Daemon thread is a low priority threadB) It runs intermittently in the backgroundC) It does the garbage collection operation for the java runtime system.D) All of the above Latest Answer : All of the above(D) is correct answer. ... A) TrueB) FalseExplanation: It is not possible. A) FalseB) True Latest Answer : False. The word synchronized can also be used to make a block of code synchronized.Eg: synchronized(object) { ............code........... }Raghu. ... A) TrueB) False Latest Answer : I choose the answer as false but i got it wrong ... State true or false :- The run() method should necessary exists in class created as subclass of thread? A) TrueB) False State true or false :- When two threads are waiting on each other and can't proceed the program is said to be in a deadlock? A) TrueB) False Which of the following is true?1) wait(),notify(),notifyall() are defined as final & can be called only from with in a synchronized method2) Among wait(),notify(),notifyall() the wait() method only throws IOException3) wait(),notify(),notifyall() & sleep() are methods of object class A) 1B) 2 & 3C) 1 & 2D) 1 2 & 3
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||