Can you call a constructor within a constructor?

Answer Posted / ravikiran(aptech mumbai)

yes we can call by make use of this()

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why java is considered as platform independent?

595


how to split string in java?

659


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 subkeys = key.subkeys(); subkeys.hasNext();) { RegistryKey subkey = subkeys.next(); System.out.println(subkey.getName()); // You need to check here if there's anything which matches "Mozilla FireFox". } } }

1353


What does it mean to be immutable?

552


Explain what access modifiers can be used for variables?

593






can I implement my own start() method? : Java thread

557


What is difference between final and finally in java?

587


'A class is a template for an object' explain this statement.

548


What is meant by interface?

565


Is java developer a good career?

558


What happens if an exception is throws from an object's destructor?

587


How do you break a loop?

567


What are the four pillars of java?

614


What are triggers in DB? Explain their types. How do they work?

630


Is java based on c?

539