we have syntax like for(int var : arrayName)
this syntax is to find whether a number is in the array or
not.but i want to know how to find that number's location.
No Answer is Posted For this Question
Be the First to Post Answer
How to eliminate duplicates from an array?
6 Answers ABC, AdMod, Adobe, College School Exams Tests, Patni, Wipro,
Which class is the immediate superclass of the Container class?
interface X{ void m1(); void m2(); } class Child2 extends Object implements X { public void m1(){ System.out.println("Child2 M1"); } public void m2(){ System.out.println("Child2 M2"); } } public class ParentChildInfterfaceDemo { public static void main(String[] args){ X x = new Child2(); X x1 = new Child2(); x.m1(); x.m2(); x.equals(x1); } } Will the above code work? If yes? Can you please explain why the code x.equals(x1) will work as the equals method is called on interface reference vaiable?
why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why these methods are placed in Object class?
2 Answers Global Logic, Satyam,
Is java a compiler?
What is the difference between replace and replace all?
How do you sort objects in java?
What is difference between string and new string?
Difference between arraylist and vector.
Mention some features of java?
What state does a thread enter when it terminates its processing in java programming?
What classes of exceptions may be caught by a catch clause in java programming?