Win a copy of Terraform in Action this week in the Cloud forum!

Matiz Dave

Greenhorn
+ Follow
since Sep 13, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Matiz Dave

I need to design a component where I need to match properties of different objects

The database returns a list of objects for example doors, windows, slabs etc. These get populated in a multiple choice list. Each of this object can have multiple properties ie width, height, material, color etc etc. The properties can be common between the objects. However each object might have it;s own unique property / properties as well. When a user selects an object / combination of objects in the first list, second list should get populated with the properties which are common for the selected objects. What is the best way of designing this scenario? Are there any design patterns to handle this? Any help would be greatly appreciated.

Thanks in Advance.
13 years ago
Thanks, Henry

How is null evaluated? How is it more specific to a String object as compared to Object object?


Inherited doesn't mean that the child class gets a copy of the method, if it doesn't override. It just means that at runtime, the parent's version of the method will be called -- because it didn't override.



I am calling method m3 from an instance of TestStaticOverloadingChild and thought that it would get an implict access to m3 as if the method belonged to TestStaticOverloadingChild. Does it mean that at runtime, jvm maintains a copy of each object up the heirerchy? Or only one object is created but the object has information about all the objects which this object has inherited from?
I have the following code


When I run TestStaticOverloadingChild class, it prints
parentm1
childm2

I know that static methods are decided at compile time. However would method m3 be not inherited in this case and should instance of TestStaticOverloadingChild not call m1 of TestStaticOverloadingChild class?

Thanks in Advance


The above code prints "into String". How does java interpret null? How does the method having String argument get called?