Answer Posted / qamrun nisa
The static import construct allows unqualified access to
static members without inheriting from the type containing
the static members. Instead, the program imports the
members, either individually:
import static java.lang.Math.PI;
or en masse:
import static java.lang.Math.*;
Once the static members have been imported, they may be used
without qualification:
double r = cos(PI * theta);
The static import declaration is analogous to the normal
import declaration. Where the normal import declaration
imports classes from packages, allowing them to be used
without package qualification, the static import declaration
imports static members from classes, allowing them to be
used without class qualification.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain the selection sort algorithm and state its time complexity?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
Why does abstract class have constructor?
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 are predefined functions?
What happens if a constructor is declared private?
What is skeleton and stub? What is the purpose of those?
Tell me how many ways are there to initialise an integer with a constant.
What is the meaning of immutable regarding string?
What type of variable is error flag?
Why to use nested classes in java? (Or) what is the purpose of nested class in java?
When is the finalize() called?
What is prime number in java?
What do you mean by access modifier?
What is a finally block?