![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions A non-static inner class may have object instances that are associated with instances ofthe class's outer class. A static inner class does not have any object instances. Latest Answer : The static inner classes can be accessed with out creating it's objects or we can access static inner classes with direct class name but in the case of non-static inner classes access we have to create the object of that class. ... A non-static inner class may have object instances that are associated with instances ofthe class's outerclass. A static inner class does not have any object instances. A string buffer implements a mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length The equals method can be considered to perform a deep comparison of the value of an object, whereas the == operator performs a shallow comparison. The quals() method compares the characters inside a string class A { // some code here} class B { // some code here}class Ex {public static void main(string args[]) {A a=new B();B b=new A();a.add();b.add();}Will this program run? Explain the referencing the object Latest Answer : No it will not compile - as A does not extend B nor vice-versa when you try to assign an object of type B to a reference of type A (and vice-versa) you will get an 'Incompatible type' error message from the compiler! If inheritance were involved ...
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||