Is there any need to import java.lang package?

Answers were Sorted based on User's Feedback



Is there any need to import java.lang package?..

Answer / venkataanjaneyulu.sudireddy

Cloneable
Runnable

Is This Answer Correct ?    0 Yes 1 No

Is there any need to import java.lang package?..

Answer / navneet raushan

Hi Rakesh .. I m writing the code
import java.lang.reflect.*;

public class DumpMethods {
public static void main(String args[])
{
try {
Class c = Class.forName(args[0]);
Method m[] = c.getDeclaredMethods();
for (int i = 0; i < m.length; i++)
System.out.println(m[i].toString());
}
catch (Throwable e) {
System.err.println(e);
}
}
}

Is This Answer Correct ?    2 Yes 4 No

Is there any need to import java.lang package?..

Answer / rakesh

navneet can u justify your ans with example plzzzz.

Is This Answer Correct ?    1 Yes 4 No

Post New Answer

More Core Java Interview Questions

What is casting?

5 Answers  


Is it possible to cast an int value into a byte variable? What would happen if the value of int is larger than byte?

0 Answers  


What is considered an anti pattern?

0 Answers  


How does indexof work?

0 Answers  


What is a instance variable in java?

0 Answers  






What is singleton class and how can we make a class singleton?

0 Answers  


how many types of cloning?

4 Answers   Mobily,


Can we extend singleton class?

0 Answers  


What Is Resource Leak?

2 Answers  


What is a local, member and a class variable?

0 Answers  


What is the benefit of inner classes in java?

0 Answers  


Is java a digit method?

0 Answers  


Categories