the question why x must be final ?
la valeur de x 3 la valeur de y 4 la valeur de z 5 la valeur de e 6
yes we can't call no-static method directly from static method but we can use instance Object ( create Object the same way we did in the example "Zookeeper p = new Zookeeper(); " ) to call the no-static method " p.go() "
void go() {
this.MyInner in = this.new MyInner(); // that mean Toolbox.MyInner in = Toolbox.new MyInner();
Integer i3 = in.doInner();
Toolbox t = new Toolbox();
st = t;
System.out.println(i3);
14. }
still have reference that object so for that it cant be GC.this. new MyInner()
When using HashSet or LinkedHashSet, the objects you add to them
must override hashCode(). If they don't override hashCode(), the default Object.
hashCode() method will allow multiple objects that you might consider "meaningfully
equal" to be added to your "no duplicates allowed" set.
In your case, you have not overridden hashCode method. Thus, add method will call hashCode method of Object class. Now, if that method returns different hashCode (and mostly it does) for a1 and a2, then from add method's perspective, those objects belong to two different buckets, and hence cannot be equal.
add.( new Animales() )
?x IS-A Dog, x IS-A Animales, and x IS-A Object
Can you explain to us why you think that a List<? super Dog> should be able to add Dog, Animales, and Object? ... because that is not true.
Henry
andAnimales
but we can addObject
Dog
that mean evrything super DogList<? super Dog>
we havelist1.add( new Animales)
that mean we can addList< ? super Dog>
Dog
andAnimales
Object
Look at your string, and find everywhere there is a "dot followed by one character", and it should be clear what is going on.
i will have 4 and x45 and a . the out put will be : 4 x45 a"4.x45.a.3"
she didnt make the out put : 4 x45 a 3s.split("\\.." + "");
- Do you know what is an anonymous class? Do you know what is an inner class?