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

Explain the concept of proper inheritance?

0 Answers   Thomson Reuters, Virtusa,


What are data structures in java?

0 Answers  


What is the default size of set in java?

0 Answers  


What does system out println () do?

0 Answers  


What is the difference between serial and throughput garbage collector?

0 Answers  


system.out.println(1 + 3);

8 Answers  


What are virtual methods?

1 Answers   TCS,


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

0 Answers  


why we need this (1.object,2.class,3.data hiding,4.encapsulation,5.abstraction,6. polymorphism,7.inheritance)

2 Answers  


Explain java heap space and garbage collection?

0 Answers  


what is method reference in java 8?

0 Answers  


If you are reviewing the code of your team members, what points will you look at, assuming the performance of the application is not so great

2 Answers   KPIT,


Categories