There are 2 classes, 1 LandAnimal and another WaterAnimal.
There is another class Animal which wants to have the
properties of both LandAnimal and WaterAnimal. How will you
design this situation?
Answer Posted / vikneswarank
class LandAnimal
{
//some code here
}
class WaterAnimal extends LandAnimal
{
//soma code here
}
class Animal extends landAnimal
{
// here we can access properties both class
}
| Is This Answer Correct ? | 2 Yes | 19 No |
Post New Answer View All Answers
What is an iterator java?
Explain the term virtual machine?
How do you compare two objects?
Explain java thread life cycle.
What is the difference between compare and compareto in java?
What is methodological theory?
What is mysql driver class name?
Which collection is thread safe in java?
What does localhost mean?
What is the purpose of the return statement?
Define a java class.
How to find the given number is a prime number or not by getting input from the user
What is a parameter in a function?
Is there any way to find whether software installed in the
system is registered by just providing the .exe file?
I have tried the following code but its just displaying the
directory structure in the registry.
Here the code :
package com.msi.intaller;
import java.util.Iterator;
import ca.beq.util.win32.registry.RegistryKey;
import ca.beq.util.win32.registry.RootKey;
public class RegistryFinder {
public static void main(String... args) throws Exception
{
RegistryKey.initialize(RegistryFinder.class.getResource("jRe
gistryKey.dll").getFile());
RegistryKey key = new RegistryKey(RootKey.HKLM,
"Software\\ODBC");
for (Iterator
What is replaceall in java?