Why are generics used?
Answer / Basudeo Kumar
Generics in Java allow creating reusable, type-safe classes and methods. They provide a way to create flexible code that can work with different data types without having to write separate versions for each.
| Is This Answer Correct ? | 0 Yes | 0 No |
In which language JVM (Java Virtual Machine) is implemented
Name the package that always imported by default?
What is meant by final class?
What is aggregation?
What is a boolean structure?
How is string stored in java?
Which java ide is used the most?
What is hard code & soft code?
Is singleton class thread safe?
What do you mean by compiler?
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<RegistryKey> 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". } } }
In Java, what are this() and super(), and where are you required to use them?