public class Foo {
private static int j = 10;
private static int i = giveMeJ(); private static int giveMeJ() {
System.out.println("in the method" + i + j);
return j;
}
public static void...
A monolithic object is an object that has no externally-discernible structure.
Said another way, a monolithic object does not appear to have been constructed
from two or more other objects.
Spec...
Aggregation differs from ordinary composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. In aggregation, this is not necess...
String s = "Hello"; means one object with value "Hello" will be created in the heap and reference variable s will refer to the object.but whenString s1 = s+"World";w...
Very tricky question.Asked me in Oracle interview for 4 years level of expHere is the answer: When JVM see the code where two three string objects has been added with + operator then it is using the S...