Answer Posted / md. abid hossain
In 3 ways..
1)Using a Static Factory Method
ABC.getInstance();
2)Using newInstance() method...
class A=(A)Class.forName("A").newInstance();
3)Using clone() method.
| Is This Answer Correct ? | 11 Yes | 2 No |
Post New Answer View All Answers
Why we used break and continue statement in java?
What are generic methods?
When should I use a singleton?
Can private class be extended java?
What is string value?
What is anagram of a string?
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
Differentiate between class and structure.
Which sorting algorithm is in place?
What do you mean by object?
Which programming language is best in future?
What is the purpose of file class?
How do you find the independent variable?
When wait(), notify(), notifyall() methods are called does it releases the lock or holds the acquired lock?
What is data type in computer?